rsync-time-backup icon indicating copy to clipboard operation
rsync-time-backup copied to clipboard

Deleting `.inprogress` file when `rsync` reports an error loses savings of incremental backups.

Open cr1901 opened this issue 5 years ago • 1 comments

https://github.com/laurent22/rsync-time-backup/commit/d152279d301bf799c496d00d9b2aa706b46e88c6

A number of my backups have been done with a dodgy Internet connection as of late. This means that long-running backups will sometimes fail due to the remote "hanging up". As of the commit listed above, backups that end when rsync reports an error are treated as successful.

This means rather than continuing a previously in-progress backup, rsync-tmbackup.sh will think that an incomplete backup is in fact the latest backup and use that as the rsync --link-dest. Because link-dest was a failed, incomplete backup, this results in a large number of files being transferred redundantly to the destination that would otherwise be replaced with a hard-link to the last time these files were changed.

I would prefer that an incomplete backup still be considered .inprogress. Subsequent attempts to do a backup will use less bandwidth as more and more files are considered to match. Eventually, my rsync backups will be completed even over a dodgy connection, while still having the space savings on an incremental backup :).

cr1901 avatar Oct 06 '18 19:10 cr1901

Seems related to https://github.com/laurent22/rsync-time-backup/issues/64 ; in https://github.com/laurent22/rsync-time-backup/pull/209 such errors can be detected, and the resulting backup would not be considered successful.

fthiery avatar Apr 29 '20 17:04 fthiery