[Gllug] Verifying rsync copy

James Courtier-Dutton james.dutton at gmail.com
Wed May 13 14:17:42 UTC 2009


2009/5/13 Jon Dye <jon at pecorous.co.uk>:
> Hi all,
>
> I use rsync to copy a directory of files to a remote location from a
> cron job once a day.  Currently I give it the --verbose option so in
> my email from cron I can see that it's actually worked (normally it's
> silent).  I'd rather just have my cron email tell me if it transfered
> anything and/or that the remote and local directories have the same
> contents.
>
> One thought I had was to run the rsync without --verbose first to make
> the copy and then to run it again with --verbose to verify the result.
>  Unfortunately this still passes me several lines that I don't really
> want.  Does anyone know if there is some way to get rsync to just
> return whether or not files were actually sent?  Is there some clever
> parsing of output I can do?  Anyone have any other ideas (using any
> other tools)?
>
> Thanks,
>
> JD
> --

Read up on how rsync works. It is pretty robust. It does checksums etc.
I have never had problems with rsync. I sometimes use the checksum
option, but this takes considerably longer to start up as it has to
scan all local and remove files.
An option is to create a sha256sum file of all local files, and then
use that file to run a sha256sum check on the destination files. I use
this for the backup of my .jpg pictures in case file corruptions
occurs I can detect it quickly.

Another option is to not use rsync, but instead use a network backup
software like bacula.
This results in the backup holding the state of every single backup,
instead of just holding the current day's state.

James
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list