Symlinks in source path with --relative

Phil Endecott spam_from_rsync at chezphil.org
Wed Aug 13 21:11:42 GMT 2008


Matt McCutchen wrote:
> On Wed, 2008-08-13 at 13:01 +0100, Phil Endecott wrote:
>> I have a fairly straightforward backup script that does something like this:
>> 
>> cd /
>> rsync -a --delete --relative home/phil/important backupserver:/backup/foo/
>> 
>> This was working fine and, for example, /home/phil/important/file1 was 
>> copied to /backup/foo/home/phil/important/file1 on the backup server.
>> 
>> But then I changed the disk partition arrangement on the source 
>> machine.  Before, /home was a filesystem; now there's a filesystem 
>> called /data, and /home is a symlink to /data/home:

>> Now, it seems that rsync notices this symlink and tries to recreate it 
>> on the backup server because of the -l implied by -a.  This is not what 
>> I want.  However, I do want any symlinks inside /home/phil/important to 
>> be copied as links, so I can't simply drop the -l.
>
> Upgrade the sending rsync to 3.0.0 or newer (which always sends
> ancestors of a source argument as directories, not symlinks, with
> --relative) or pass --no-implied-dirs to avoid processing the ancestors
> of home/phil/important at all.

Thanks for the quick reply Matt.  I have upgraded to 3.x and it now 
seems to be doing what I want.

Cheers,  Phil.






More information about the rsync mailing list