I have a 150GB directory tree that I need to rsync nightly. Periodically I adjust many permissions on this source tree. My question is whether rsync will backup the whole source tree if only the permissions changed. Thanks in advance for any help, Pablo
On Thu, 9 Jun 2005, CompuGenic wrote:> I have a 150GB directory tree that I need to rsync nightly. Periodically I > adjust many permissions on this source tree. > My question is whether rsync will backup the whole source tree if only the > permissions changed.If you don't specify --whole-file/-W, rsync will do checksums on either end to determine if the file is still unchanged, and then it will adjust the permissions on the other side. So no, it will not re-transfer the entire file. Moshe -- Moshe Jacobson -- http://runslinux.net -- AIM: Jehsom | This message is strictly confidential; it should be shown to nobody | | except the listed addressee(s). If you've received this message in | | error, please promptly delete it and notify the sender. |
On Thu, Jun 09, 2005 at 04:26:27PM -0700, CompuGenic wrote:> If only the permissions changed on the source, > will rsync unlink the file before modifying it on the destination?No. Rsync just changes the permissions/group/owner of a file if it differs.> I do "cp -ar daily.01 daily.00". Then I do "rsync - ar -e "ssh -i keypath" --delete > user@remote:/source/path/ /local/path/daily.00/".You'd be better off getting rid of the cp command and using the --link-dest=/local/path/dail.01 option to rsync so that it manages all the hard-linking of files to the older versions. Rsync only hard-links files that are exactly the same in all (preserved) attributes, and it uses the older file as a means to optimize the transfer when the file differs. With the current release of rsync, you can even specify multiple --link-dest=DIR options, which allows a file to be hard-linked to an older version (if a file reverts to an earlier state). ..wayne..