Problem with rsync-2.6.8 and -c (checksum)

Wayne Davison wayned at samba.org
Wed May 24 16:07:25 GMT 2006


On Wed, May 24, 2006 at 07:56:54AM +0200, Andreas Fehr wrote:
> I'm back with my -cav and rsync does not copy files, even if I've 
> touched them.

Are you copying into an already populated destination directory?  It
sounds like it.  When --link-dest is used to create a new hierarchy,
rsync will only hard-link items that have identical preserved
attributes, which means that it won't hard-link a file that is going to
have a different time if -t was specified, and the same thing occurs for
permissions, group, and ownership if they are preserved.  However, if
you copy into a directory that already has files, rsync treats any
destination files as fully manipulatable, and will simply change any
modified attributes on an existing, unmodified file (as determined by
either the quick check, or, when using -c, the checksum).

So, for folks that value fully correct attributes over space savings on
their backups, using rsync with --link-dest into an empty destination
gives you that.  For those that value space savings over historically
correct file attributes, you can instead precede the rsync copy with a
"cp -al" command to create the new destination hierarchy from yesterday's
hierarchy, and then use rsync (without --link-dest) to copy into that
destination (using -c if you want it to ignore timestamp changes).  E.g.:

    ssh dest cp -al /some/backup/2006-05-{23,24}
    rsync -avc --del /source/dir/ dest:/some/backup/2006-05-24

Another potential option for those that value both minimized disk use and
accurate attributes:  the BackupPC program (listed on the resources web
page) implements its own rsync client that can grab files via the rsync
protocol (either normal or daemon protocol), but store them in a database
that stores identical files together, and compresses the data too.

..wayne..


More information about the rsync mailing list