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.




3210 posts

Uber Geek
+1 received by user: 1683

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

Uber Geek
+1 received by user: 764

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.




3210 posts

Uber Geek
+1 received by user: 1683

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


 
 
 
 


296 posts

Ultimate Geek
+1 received by user: 8


  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

 

 

 

 




3210 posts

Uber Geek
+1 received by user: 1683

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

 

 


296 posts

Ultimate Geek
+1 received by user: 8


  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.


230 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


19924 posts

Uber Geek
+1 received by user: 3647

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

328 posts

Ultimate Geek
+1 received by user: 66

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.


6280 posts

Uber Geek
+1 received by user: 2734

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 »

Nothing nebulous about Microsoft’s cloud-transition
Posted 21-Jul-2017 15:34


We’re spending more on tech, but not as much as Australians
Posted 21-Jul-2017 11:43


Endace announces EndaceFabric for network-wide packet recording
Posted 20-Jul-2017 20:49


Acorn 6: MacOS image editing for the rest of us
Posted 20-Jul-2017 17:04


HTC faces backlash over keyboard pop-up ads
Posted 19-Jul-2017 15:53


BNZ adds Visa credit cards to Android Pay wallet
Posted 18-Jul-2017 19:44


Still living in a Notification hell – Om Malik
Posted 18-Jul-2017 13:00


Duet Display uses iPad to extend Mac, PC
Posted 18-Jul-2017 10:58


PC sales could be worse
Posted 17-Jul-2017 07:34


Crypto-currencies, tulips, market bubbles
Posted 17-Jul-2017 06:38


NZ Tech Podcast: Big batteries, solar cars, cold war, IoT
Posted 16-Jul-2017 16:53


Vodafone Australia mulls Wisp alliance, NZ implications
Posted 13-Jul-2017 16:49


Rural health professionals see fibre pay-off
Posted 13-Jul-2017 11:52


Vodafone announces expansion of $5 Daily Roaming
Posted 13-Jul-2017 10:20


Intel unveils powerful Intel Xeon Scalable processors
Posted 12-Jul-2017 20: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.