Options for a "I'm done" flag file

Mark mark0x01 at gmail.com
Wed Apr 29 04:19:46 MDT 2015


For a push job.

Run the rsync for the files,
if the exit code is 0, create the flag file and then rsync just that 
file on its own.




On 28/04/2015 10:38 p.m., Simon Hobson wrote:
> As part of my backup system, I use Rsync to keep a copy of each server on one central backup server. This backup server then uses StoreBackup to keep multiple iterations of each clone directory.
> So that the StoreBackup archives don't keep adding "redundant" and misleading backups, I update a flag file with the current date/time before doing the Rsync update, and test to see if this file is newer than the one in the latest StoreBackup backup. If it isn't, then I skip the StoreBackup for that server.
>
> The end result is that if a system is down or out of communication (one or two are at sites that can be offline for days), then the list of backups in StoreBackup will reflect that. Eg, if the system did a sync on the 1st, but not on 2nd - 5th, then there will be no backups for 2nd-5th, and when looking later I won't be "fooled" into thinking that I have a backup from (say) the 4th.
>
> Where this breaks down is if the sync fails part way through. The flag file has already been synced, so I have multiple backups which aren't actually complete.
> I actually have this at the moment. Just put a small system on a customer site, it has a database that creates 1GB journal files (not that it handles anything like that volume of data), and at the moment their connectivity is a bit flakey.
>
> My first thought was "do the flag file last", but a quick search confirms what I thought - that there isn't an option for this.
>
> So, does anyone have any suggestions how I might reasonably easily get the ability for my script to see if the previous sync completed ?
>
>



More information about the rsync mailing list