Bug 11800 - smarter "safe" symlink detection
Summary: smarter "safe" symlink detection
Status: NEW
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.1
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-17 00:02 UTC by world.locus
Modified: 2016-09-19 21:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description world.locus 2016-03-17 00:02:19 UTC
Hi,

We are using --copy-unsafe-links to sync a complex file/directory tree that spans over multiple nfs drives to another site. However, --copy-unsafe-links considers the following subdir1_link symlink as "unsafe":

/nfs/dir1/subdir1/
|-- file1
|-- subdir1_link -> /nfs/dir1/subdir1
`-- subdir2
    `-- file2


subdir1_link is detected as unsafe and therefore its content is synced over and over and therefore we get the following:

/nfs/dir1/subdir1/subdir1_link/subdir1_link/subdir1_link/...


Is it possible to detect that subdir1_link is actually a "safe" symlink and sync it as:

subdir1_link -> .

Regards,
Mak
Comment 1 world.locus 2016-09-19 21:50:43 UTC
a simpler enhancement would be to add an exclude switch for excluding files/dirs from unsafe link detection so that we can exclude circular symlinks manually.

e.g. --exclude-unsafe-link '*parent*'

these excluded symlinks would be synced as symlinks