Hello All, I've been googling a lot but I can't find any suitable solution or advice, so I'm asking you. I'm trying do find a way to sync two distant folders containing symlinks pointing to files outside the synced folders BUT with different target names. Here is an example: ./dir1: (source) file --> ../data/file ./dir2: (destination) file --> ../share/other_file The goal would be to update 'share/other_file' with the contents of 'data/file', without modifying the existing 'dir2/file' symlink. I couldn't find any combination of option (--copy-unsafe-links, -l, -L, etc.): either 'dir2/file' symlink is deleted and replaced with a real file, or 'dir2/file' is replaced by a symlink pointing to '../data/file'... that doesn't exist in destination tree. I would really appreciate if anyone had any idea to solve this case. Thanks, Greg (Paris)
Greg Deback (rsync) wrote:> Hello All, > > I've been googling a lot but I can't find any suitable solution or > advice, so I'm asking you. > I'm trying do find a way to sync two distant folders containing > symlinks pointing to files outside the synced folders BUT with > different target names. > > Here is an example: > ./dir1: (source) > file --> ../data/file > ./dir2: (destination) > file --> ../share/other_file > > The goal would be to update 'share/other_file' with the contents of > 'data/file', without modifying the existing 'dir2/file' symlink. I > couldn't find any combination of option (--copy-unsafe-links, -l, -L, > etc.): either 'dir2/file' symlink is deleted and replaced with a real > file, or 'dir2/file' is replaced by a symlink pointing to > '../data/file'... that doesn't exist in destination tree. > > I would really appreciate if anyone had any idea to solve this case.There's no way. If you want to sync the content of ../data/file to ../share/other_file, then you have to do this explicitly. rsync -aHxi ${source}/../data/file ${destination}/../share/other_file Have a nice day, Berny
Seemingly Similar Threads
- symlink in -R src_dirlist and real dirs on target
- Odd behavior with --detect-renamed
- rsync-ing from two locations with same filenames (at different versions)
- directories not correctly recognized rsync-3.0.4
- [Bug 13587] New: Add a --dry-run way to show destination for each item