Friday 30 May 2014

backing up the BeagleBone Black eMMC


After you have got the BBB up and running how you like it, backing up is always a good idea.
If, like me, you are using it for home automation based on the Livebox, you can of course back up the ini settings, plugboard scripts etc using the web GUI but I like to keep a backup of the entire eMMC.
There are a few methods to be found on the 'net that require the use of a script on a microSD card. This is ideally the best way but requires stopping the BBB (and if SWMBO is expecting things to happen, that's never good)
So here is an option to use dd over ssh to backup to another PC (in my case a mac)
on the BBB
sudo dd if=/dev/mmcblk0 bs=1M | ssh themac@192.168.0.X "dd of=/Users/themac/Desktop/BBB_Backup_date.img bs=1m"
n.b. the block size is set on the BBB using bs=1M but on the mac HAS to be bs=1m (lowercase) (I'm not sure if this is the case :) on a pc)
To restore. This needs to be done after booting from an SD card to free up the eMMC The eMMC is then mmcblk1 not mmcblk0
ssh themac@192.168.0.X "dd of=/Users/themac/Desktop/BBB_Backup_date.img bs=1m” | sudo dd of=/dev/mmcblk1 bs=1M
Then power down, remove the SD card and reboot.

No comments:

Post a Comment