Scripts from the raspberry.tips backup guide:
rpi-clone-setup.sh– installs rpi-clone (Jeff Geerling's fork) and prints the common commandspi-backup.sh– rsync backup of/homeand/etcto a drive mounted at/mnt/backup; skips the run if the drive is not mountedcrontab-example.txt– cron line for a nightly run
- Format the backup drive as ext4. On FAT32/exFAT, rsync loses owners, permissions and symlinks (
/etc/shadowwould become world-readable). --deletemakes the target a mirror: files deleted on the Pi disappear from the backup on the next run. For several versions, use raspiBackup or shrink-backup (see the guide).- Use the maintained rpi-clone fork (geerlingguy); the original (billw2) has not been maintained since 2020.