Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




3302 posts

Uber Geek
+1 received by user: 1749

Trusted
Spark NZ

Topic # 216714 9-Jul-2017 19:50
Send private message quote this post

I need to create a backup of my working OpenHab config on a Rpi microSD card before I stuff around and upgrade everything and probably break it.

 

How do I do it? Please don't tell me to use one of the literally dozens of guides saying to use Win32 Disk Imager, because me card looks like this.

 

 

I found one post with someone suggesting "Roadkil's DiskImage Version 1.6" which I am using now, but that had no replies. I found a few other people with the same issue (of a multiple partition SD card) but no obvious answers.

 

Other options

 

DD (on the Pi itself) : This also seems to assume a single partition, or needing to restore only a single partition. Yeah, it might work but I want to be able to dump one image back on a card to get a working image back.

 

Apparently there's an SD card copier added as well ( https://www.raspberrypi.org/blog/another-update-raspbian/ ) but again, it's not clear whether this will copy all partitions, or restore them...

 

Can anyone help me out with the easiest approach here? Will one of the options I have discarded actually do what I want without being an expert in Linux and knowing exactly how to recreate the CD card partitions of exactly the right size and type?

 

Cheers - N

 

 


Create new topic
5766 posts

Uber Geek
+1 received by user: 818

Trusted
Subscriber

  Reply # 1817465 9-Jul-2017 19:59
Send private message quote this post

dd can copy the entire card. I've only done it on a Mac, and Linux uses different notation for naming disks, but I think you want to leave the number off the end of the device name (eg. if /dev/sda0 is the first partition then /dev/sda is the entire disk). Don't quote me on that, but I think that's how it works under Linux.




3302 posts

Uber Geek
+1 received by user: 1749

Trusted
Spark NZ

  Reply # 1817466 9-Jul-2017 20:02
Send private message quote this post

Yep - I was in windows at the time, and doing the slow sector backup using the windows app I listed... I have seen that there are some dd commands that will do the whole card as well... Still pretty frustrating that the Google results are so polluted with an obvious, easy solution that doesn't work for me :-)

 

I think my sector backup is ok, so have started typing all sorts of reckless upgrade commands :-)

 

I wish there was a simple how-to: that actually matched my setup.... I don't recall being stupid when I set it up so there must be others in the same state.

 

 

 

Cheers - N


 
 
 
 


314 posts

Ultimate Geek
+1 received by user: 12


  Reply # 1817475 9-Jul-2017 20:40
Send private message quote this post

I've actually just spent the last 2hrs figuring out how to use Amanda to backup my Openhabian PI install I spent all weekend rebuilding. I might have a valid backup now, but I'm not yet brave enough to test a restore.

 

https://github.com/openhab/openhabian/blob/master/docs/openhabian-amanda.md

 

 

 

 




3302 posts

Uber Geek
+1 received by user: 1749

Trusted
Spark NZ

  Reply # 1817477 9-Jul-2017 20:44
Send private message quote this post

plas:

 

I've actually just spent the last 2hrs figuring out how to use Amanda to backup my Openhabian PI install I spent all weekend rebuilding. I might have a valid backup now, but I'm not yet brave enough to test a restore.

 

https://github.com/openhab/openhabian/blob/master/docs/openhabian-amanda.md

 

 

Thanks - bookmarked. I'm still on a POC install only, but will include that when I set things up properly in a couple of months!

 

Cheers - N

 

 


314 posts

Ultimate Geek
+1 received by user: 12


  Reply # 1817479 9-Jul-2017 20:50
Send private message quote this post

 When you run openhabian-config there is an option to setup backups, run through that to install and configure. I just had issues because I wanted to dump to a network share and which then ran into permission issues. Looking at the log files now I can see the backups have occurred but the disk image has failed.


244 posts

Master Geek
+1 received by user: 44


  Reply # 1817489 9-Jul-2017 21:27
Send private message quote this post

I normally use Clonezilla for disk and partition backups.  If you have a PC with an SD card reader, boot that from a Clonezilla image and you should be able to do a proper backup.

 

http://clonezilla.org


20182 posts

Uber Geek
+1 received by user: 3782

Trusted
Subscriber

  Reply # 1817491 9-Jul-2017 21:31
Send private message quote this post

What happened when you tried win32diskimager on that card? I have an issue with windows 10 in that it seems to try to mount all the partitions on the card, so sometimes it will not be able to lock the drive but removing drive letters from the other partitions that are not boot in disk managment lets win32diskimager do its thing ok.





Richard rich.ms

IcI

445 posts

Ultimate Geek
+1 received by user: 95

Trusted

  Reply # 1817536 9-Jul-2017 23:20
Send private message quote this post

Hi.

 

Considering your screenshot looks like it was taken from Windows, why not try ImageUSB?

 

     

  1. Copies the entire SD card / USB drive into file anywhere else on your PC. Backup sorted.
  2. Need to restore, simple select single file and write to new SD card / USB drive. Plug in & reboot RPi.

 

ImageUSB copies bootable sectors & works very quickly, even via USB 2.


6548 posts

Uber Geek
+1 received by user: 2958

Moderator
Trusted
Subscriber

  Reply # 1817537 9-Jul-2017 23:43
Send private message quote this post

dd if=/dev/sdb of=/path/to/image.img bs=1024k

 

Since you're dealing with a Linux EXT4 partition do the disk copy under Linux and just tar it up from there. Anything else is bound to cause you issues.





Michael Murphy | https://murfy.nz
Want to be with an epic ISP? Want $20 to join them too? Well, use this link to sign up to BigPipe!
The Router Guide | Electric KiwiCommunity UniFi Cloud Controller | Ubiquiti Edgerouter Tutorial


Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Symantec protects data everywhere with Information Centric Security
Posted 21-Sep-2017 15:33


FUJIFILM introduces X-E3 mirrorless camera with wireless connectivity
Posted 18-Sep-2017 13:53


Vodafone announces new plans with bigger data bundles
Posted 15-Sep-2017 10:51


Skinny launches phone with support for te reo Maori
Posted 14-Sep-2017 08:39


If Vodafone dropping mail worries you, you’re doing online wrong
Posted 11-Sep-2017 13:54


Vodafone New Zealand deploy live 400 gigabit system
Posted 11-Sep-2017 11:07


OPPO camera phones now available at PB Tech
Posted 11-Sep-2017 09:56


Norton Wi-Fi Privacy — Easy, flawed VPN
Posted 11-Sep-2017 09:48


Lenovo reveals new ThinkPad A Series
Posted 8-Sep-2017 14:37


Huawei passes Apple for the first time to capture the second spot globally
Posted 8-Sep-2017 10:45


Vodafone initiative enhances te reo Maori pronunciation on Google Maps
Posted 8-Sep-2017 10:40


Voyager Internet expand local internet phone services company with Conversant acquisition
Posted 6-Sep-2017 18:27


NOW Expands in to Tauranga
Posted 5-Sep-2017 18:16


Windows 10 Fall Creators Update coming Oct. 17
Posted 4-Sep-2017 14:10


Garmin introduce Garmin vivoactive 3
Posted 1-Sep-2017 18:38



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.