Sometimes, on a large rsync using Rsnapshot, the NFS mount we are syncing to will drop.
Then when you run:
rnsapshot monthly
to resume it, it will behave as if this is a brand new, rotating the monthly.0
to monthly.1
and so on.
Is there a way to resume the rsync
using rsnapshot monthly
if something gets interrupted? That won't start a brand new backup?
The answer is no not really but sort of. rsnapshot runs as a batch job - generally triggered from a cron job. It does not keep any state between runs apart from the backups themselves. If your NFS mount goes away mid backup, after a while you'll get some sort of IO error, and rsnapshot will give up and die with an error. The backup will fail. Next time it is run after the failure, it will start the backup as if from scratch.
However, if you use the
sync_first
config option, and not thelink_dest
option, rsnapshot will do a better job of recovery. It will leave the files its already transferred in place and won't have to transfer them again, but it will have to check again that the source and destination are the same in the usualrsync
way. The man page gives some detail on this.This is not the case with the
link_dest
method which for most errors removes the work its done and starts again. Specifically, on errorlink_dest
does a "rollback" like this:If your not using it already, and you can use it (apparently some non UNIX systems can't), use the
sync_first
method.