Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3576

Advanced users • rsync backups may create inconsistent backups with binNMU packages

$
0
0
I had to restore a Raspberry backup two days ago created with rsync because my SD card died.

Unfortunately the restored system was unable to start Networkmanager. It took me two days to find the root cause of the issue: It's related to the way rsync detects a file was updated and binNMU packages.

this and this thread in this forum helped me to find the root cause and how to fix it.

rsync uses the date and file size to detect a file change. binNMU packages unfortunately don't change the date. librtmp which is used by NetworkManager unfortunately also doesn't change the file size and therefore this file is not updated when rsync is used and my restored image had the old backlevel librtmp shared library :-(

rsync Option -c will use a checksum of the source and target file to decide whether a file has changed and then this issue will not happen. This unfortunately has a performance impact. Metadata check of date and size is much more efficient.

So this is an issue for everybody who uses rsync to create backups or uses a backup tool which uses rsync. As far as I know everybody uses the standard file change detection algorithm of rsync and not option -c.

raspiBackup can be forced to use option -c with option

Code:

DEFAULT_RSYNC_BACKUP_ADDITIONAL_OPTIONS="-c"

image-backup option -o allows to pass this option to rsync.
rpi-clone does not allow to add additional rsync options

Frankly I'm shocked the way binNMU packages are handled when they are updated. rsync is a common tool to create backups and fails to handle binNMU packages correctly - if not option -c is used - and thus can create inconsistent backups :-(

Statistics: Posted by framp — Fri Sep 20, 2024 9:19 pm — Replies 1 — Views 47



Viewing all articles
Browse latest Browse all 3576

Trending Articles