link-dest or cp -al?
Wayne Davison
wayned at samba.org
Sun Apr 9 07:05:36 GMT 2006
On Sat, Apr 08, 2006 at 11:36:21PM -0500, Max Kipness wrote:
> cp -al /backup/Current /backup/$yesterday_date
> rsync /source/ /Current/ [...]
With that combination of commands, the rsync command can affect the
permissions on files in the backup directory (or directories) when it
adjusts the permissions of otherwise unchanged files in the destination
directory. The alternative is this:
mv /backup/Current /backup/$yesterday_date
rsync -a --link-dest=/backup/$yesterday_date [...] /source/ /Current/
That would also create hard-links for identical files, but the files
must be the same clear down to the permissions.
So, you can use whichever method you prefer: the former might save some
disk space because it doesn't guarantee that historical permissions are
accurate, while the latter preserves permission changes at the expense
of creating a separate copy of the affected file.
..wayne..
More information about the rsync
mailing list