geerlingguy / rpi-clone

A shell script to clone a booted disk on a Raspberry Pi.
https://rpi-clone.jeffgeerling.com/
BSD 3-Clause "New" or "Revised" License
272 stars 16 forks source link

rsync backups may create inconsistent backups with binNMU packages #45

Open framps opened 1 month ago

framps commented 1 month ago

It's not an issue but a warning -> See this thread

Unfortunately rpi-clone doesn't support to pass any additional option for rsync. rsync uses the date and file size to decide whether a file was updated and will not backup binNMU files which keep the date and file size in new packages. You manually have to modify following line in rpi-clone:

rsync_options="--force -rltWDEHXAgoptx"

and add c if you want to use the checksum algorithm. Keep in mind this will have a serious performance impact.

I detected this issue when I restored a Raspberry 1B running with Bookworm and the NetworkManager didn't start any more. I described the fix here on my website. Actually I used raspiBackup to create and restore the backup but this is an issue for every backup tool which uses rsync as rpi-clone also does.