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.


3537 posts

Uber Geek
+1 received by user: 2044

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

Uber Geek
+1 received by user: 1014

Trusted
Lifetime 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.




3537 posts

Uber Geek
+1 received by user: 2044

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


343 posts

Ultimate Geek
+1 received by user: 16


  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

 

 

 

 




3537 posts

Uber Geek
+1 received by user: 2044

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

 

 


343 posts

Ultimate Geek
+1 received by user: 16


  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.


346 posts

Ultimate Geek
+1 received by user: 68


  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


21121 posts

Uber Geek
+1 received by user: 4210

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

679 posts

Ultimate Geek
+1 received by user: 149

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.


Meow
7446 posts

Uber Geek
+1 received by user: 3583

Moderator
Trusted
Lifetime 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.





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 »

N4L helping TAKA Trust bridge the digital divide for Lower Hutt students
Posted 18-Jun-2018 13:08


Winners Announced for 2018 CIO Awards
Posted 18-Jun-2018 13:03


Logitech Rally sets new standard for USB-connected video conference cameras
Posted 18-Jun-2018 09:27


Russell Stanners steps down as Vodafone NZ CEO
Posted 12-Jun-2018 09:13


Intergen recognised as 2018 Microsoft Country Partner of the Year for New Zealand
Posted 12-Jun-2018 08:00


Finalists Announced For Microsoft NZ Partner Awards
Posted 6-Jun-2018 15:12


Vocus Group and Vodafone announce joint venture to accelerate fibre innovation
Posted 5-Jun-2018 10:52


Kogan.com to launch Kogan Mobile in New Zealand
Posted 4-Jun-2018 14:34


Enable doubles fibre broadband speeds for its most popular wholesale service in Christchurch
Posted 2-Jun-2018 20:07


All or Nothing: New Zealand All Blacks arrives on Amazon Prime Video
Posted 2-Jun-2018 16:21


Innovation Grant, High Tech Awards and new USA office for Kiwi tech company SwipedOn
Posted 1-Jun-2018 20:54


Commerce Commission warns Apple for misleading consumers about their rights
Posted 30-May-2018 13:15


IBM leads Call for Code to use cloud, data, AI, blockchain for natural disaster relief
Posted 25-May-2018 14:12


New FUJIFILM X-T100 aims to do better job than smartphones
Posted 24-May-2018 20:17


Stuff takes 100% ownership of Stuff Fibre
Posted 24-May-2018 19:41



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.