Raspberry Pi Backup (Clone) with rpi-clone

Update: I now use restic combined with rclone for incremental backups to OneDrive. You can find that write-up here.

I really enjoy working on my Raspberry Pi, because all I do on it is write. In the NEO keyboard layout, no less. My Pi is my typewriter. Beautifully minimalist — Markdown and Git versioning. And I want it to stay that way, even when I update the system. Because it has happened before that an update broke everything. So: backup, backup, backup… as simple and stable as possible.

After a bit of hunting around, I settled on rpi-clone.

Here’s how it works:

First, install it:

$ git clone https://github.com/billw2/rpi-clone.git

$ cd rpi-clone

$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

Then initialise:

sudo rpi-clone-setup -t testhostname

In my case, I want to clone the USB stick in my Raspberry Pi so I can pick up right where I left off if something goes wrong. I clone to a second USB stick — a straight 1:1 copy.

You’ll need a FAT32-formatted stick, and you only have to run this once:

sudo rpi-clone sdb

This identifies the new stick as a clone target. On the rpi-clone website, that’s case 10.1 — it’s explained in detail there. After that first clone, you can run incremental clones with this command (I named mine “Backup” in the first step, so adjust accordingly):

sudo rpi-clone sdb -s backup

The beauty of this is that only the changes get synced. Most of the time that’s not much at all. But that’s exactly what I want. Since all my working files are stored on my own server via Git anyway, the main point is preserving the system itself. I run a backup every Wednesday — sometimes more often, or whenever I’m about to run updates and upgrades. It doesn’t get simpler than rpi-clone.


First published in German at reinergaertner.de, where I’ve been at it since 1997. AI did the heavy lifting on the translation. I did the heavy squinting at the result.