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.




3355 posts

Uber Geek
+1 received by user: 1775

Trusted
Spark NZ

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

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
5868 posts

Uber Geek
+1 received by user: 848

Trusted
Subscriber

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

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.




3355 posts

Uber Geek
+1 received by user: 1775

Trusted
Spark NZ

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

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


 
 
 
 


318 posts

Ultimate Geek
+1 received by user: 12


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

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

 

 

 

 




3355 posts

Uber Geek
+1 received by user: 1775

Trusted
Spark NZ

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

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

 

 


318 posts

Ultimate Geek
+1 received by user: 12


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

 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.


255 posts

Ultimate Geek
+1 received by user: 47


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

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


20349 posts

Uber Geek
+1 received by user: 3860

Trusted
Subscriber

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

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

493 posts

Ultimate Geek
+1 received by user: 108

Trusted

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

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.


6792 posts

Uber Geek
+1 received by user: 3129

Moderator
Trusted
Subscriber

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

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 GuideCommunity 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 »

UFB killer app: Speed
Posted 17-Nov-2017 17:01


The case for RSS — MacSparky
Posted 13-Nov-2017 14:35


WordPress and Indieweb: Take control of your online presence — 6:30 GridAKL Nov 30
Posted 11-Nov-2017 13:43


Chorus reveals technology upgrade for schools, students
Posted 10-Nov-2017 10:28


Vodafone says Internet of Things (IoT) crucial for digital transformation
Posted 10-Nov-2017 10:06


Police and Facebook launch AMBER Alerts system in NZ
Posted 9-Nov-2017 10:49


Amazon debuts Fire TV Stick Basic Edition in over 100 new countries
Posted 8-Nov-2017 05:34


Vodafone VoIP transition to start this month
Posted 7-Nov-2017 12:33


Spark enhances IoT network capability
Posted 7-Nov-2017 11:33


Vocus NZ sale and broadband competition
Posted 6-Nov-2017 14:36


Hawaiki reaches key milestone in landmark deep-sea fibre project
Posted 4-Nov-2017 13:53


Countdown launches new proximity online shopping app
Posted 4-Nov-2017 13:50


Nokia 3310 to be available through Spark New Zealand
Posted 4-Nov-2017 13:31


Nest launches in New Zealand
Posted 4-Nov-2017 12:31


Active wholesale as Chorus tackles wireless challenge
Posted 3-Nov-2017 10:55



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.