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.




3456 posts

Uber Geek
+1 received by user: 1902

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

Uber Geek
+1 received by user: 987

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.




3456 posts

Uber Geek
+1 received by user: 1902

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


 
 
 
 


Try Wrike: fast, easy, and efficient project collaboration software
338 posts

Ultimate Geek
+1 received by user: 14


  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

 

 

 

 




3456 posts

Uber Geek
+1 received by user: 1902

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

 

 


338 posts

Ultimate Geek
+1 received by user: 14


  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.


319 posts

Ultimate Geek
+1 received by user: 67


  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


20883 posts

Uber Geek
+1 received by user: 4094

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

663 posts

Ultimate Geek
+1 received by user: 145

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

Uber Geek
+1 received by user: 3477

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 »

Amazon launches the International Shopping Experience in the Amazon Shopping App
Posted 19-Apr-2018 08:38


Spark New Zealand and TVNZ to bring coverage of Rugby World Cup 2019
Posted 16-Apr-2018 06:55


How Google can seize Microsoft Office crown
Posted 14-Apr-2018 11:08


How back office transformation drives IRD efficiency
Posted 12-Apr-2018 21:15


iPod laws in a smartphone world: will we ever get copyright right?
Posted 12-Apr-2018 21:13


Lightbox service using big data and analytics to learn more about customers
Posted 9-Apr-2018 12:11


111 mobile caller location extended to iOS
Posted 6-Apr-2018 13:50


Huawei announces the HUAWEI P20 series
Posted 29-Mar-2018 11:41


Symantec Internet Security Threat Report shows increased endpoint technology risks
Posted 26-Mar-2018 18:29


Spark switches on long-range IoT network across New Zealand
Posted 26-Mar-2018 18:22


Stuff Pix enters streaming video market
Posted 21-Mar-2018 09:18


Windows no longer Microsoft’s main focus
Posted 13-Mar-2018 07:47


Why phone makers are obsessed with cameras
Posted 11-Mar-2018 12:25


New Zealand Adopts International Open Data Charter
Posted 3-Mar-2018 12:48


Shipments tumble as NZ phone upgrades slow
Posted 2-Mar-2018 11:48



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.