Thursday, April 10, 2014

Raspberry Pi Backup (geeking out, part 1)

"The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse."

 At $30 or so, the RPi is especially useful for many, many purposes. It makes a great teaching/learning tool. Anyway, setting the thing up from scratch is normally done on a full-sized computer. Almost all of the references I could find for backups and such also use another computer. And then I ran across exactly what I have been looking for. A script to clone the live, working, SD card to another SD card attached via a card reader.

 Installation works like this:
git clone https://github.com/billw2/rpi-clone.git
cd rpi-clone
cp rpi-clone /usr/local/sbin
 To use the script attach a reader with an SD card inserted.
"fdisk -l" will tell you the name of the card. Mine was /dev/sdb.
So to run the script...
rpi-clone (to learn about options, etc)
Then in my case
rpi-clone sdb -v -f

 It takes an hour or two the first time. After the process completes once it will do an incremental backup and only takes a few minutes.

 Perfection. Thanks BillW!

 Now that I've got a valid backup I can move on to more useful work with the thing.
-greg