Update September 2018
I read about the most convoluted ways to back up SBC systems…. some back up only data, some use arcane commands to do the job – few if any are a single click job for a complete backup that can even handle larger or smaller SDs. That is except for RPI-Clone.
Below “Original article” was written back in 2016 – things have changed a little since then. Bill Wilson has revamped his rpi-clone project and the current version of this superb command-line tool for the Raspberry Pi is here.. https://github.com/billw2/rpi-clone
I cannot overstate how useful rpi-clone is. I use it to back up my Raspberry Pi projects (Pi2 and Pi3). I have used this at the command line (no need for the graphical environment, keyboard, screen etc, I simply ssh into the board as user Pi). Typically if I am unsure of the status of an SD card used for backup, I use this:
sudo rpi-clone sda –f –U
If on the other hand I’ve already made a backup to that card in the past and hence the partition structure is guaranteed:
sudo rpi-clone sda –U
the –f option forces the program to initialise the card – and hence this backup may take some time. In the second method above, only incremental changes are made and hence a backup may take as little as a few minutes. MAGIC.
I’ve done this dozens of times on a live board without issue. –U simply means Unattended so the backup operates without asking questions and with only minimal output. Of course, there is always the possibility of losing live data, but as far as I’m, aware, I’ve not lost anything to date.
The challenge now is to get this to work with Orange Pi Plus 2E, however, despite the SD copy showing no obvious errors, I have had no joy yet here – I don’t think the copying is working on the first partitions (OP is different to RPI). I have Stretch running on the OPI +2E and it works a treat on the eMMC – however I have another OPI +2E with very much updated code and need to back that up to the other board. The difference between easy backups or not decides if this board is of any use. Right now the Raspberry Pi wins hands down because of the backup facility despite the board being no-where near as powerful as the OPI +2E.
Raspberry Pi SD Backup
I don’t know how many of you are familiar with this but I have a number of Raspberry Pi 2 and 3 units and as well as liking to keep regular backups, I like to have snapshots before I try something new – one of my main machines is in Spain, currently a long way away and the other is in the house, away from my office.
In Raspbian from the GUI you simply go to accessories, SD card backup and press a button to back everything up to an SD card that has enough room to store everything. This card can be put in another Pi and will run – every single time I’ve done this it has worked with no data loss even though the Pis are actually running as I’m backing things up.
So two things for any budding wizards out there…
1. I cannot find a way to schedule this from the command line – it seems it only runs in the GUI
2. Why can’t other systems do this – for example Armbian? Now, The so called Raspbian for the Orange Pi has the same feature but it DOES NOT WORK – I doubt anyone uses their software anyway because Armbian is better by some way… but really – simple backups means more experimenting means greater innovation, fewer heart attacks. PLEASE someone tell me I’ve missed something that does the job (and please don’t mention DD and other convoluted data only or multi-part solutions – I’m talking about a single command that makes a duplicate SD even if it is larger or smaller – that works without issue…
If Raspberry Pi people can do it – why can’t others, I wonder?