Open niknah opened 6 years ago
@niknah: Thankyou for noticing this. At very least this behaviour needs to be documented, but I'm struggling to find a common use case for this behaviour and so I would suggest the behaviour be changed so that symlinks always get backed up as symlinks.
The only exception to this rule involves the existing facility to relocate .duplicacy
directories. In this case, symlinks at the same level as the .duplicacy
directory should still be traversed by duplicacy (effectively providing a facility to explicitly include directories for backup via symlink).
@level323 what you're saying is somewhat incorrect: I (and also others) would like to be able to move the .duplicacy
folder to someplace else (for example have a folder with all the configs, and give the path to each .duplicacy
folder as needed for backup.
I think that what you want is actually for duplicacy to always and only follow the symlinks in the root of the repository.
Is my opinion correct?
@TheBestPessimist I thought that was what I was saying, but it seems possible I didn't describe it well/accurately.
In any case, we are of the same view.
In this case, symlinks at the same level as the .duplicacy directory should still be traversed by duplicacy
That made me (not?) understand it.
Can you double check? There aren't any intended changes regarding symlinks.
Sorrry, it's working. The file wasn't mentioned in -d -stats, removed my comment
May we close this?
If it has been documented so people know how symlinks are followed.
Noted here: https://forum.duplicacy.com/t/move-duplicacy-folder-use-symlink-repository/1097, but I will also create a new explicit topic about symlink behavior.
I noticed that if I have a symlink that goes to the same folder, it doesn't always gets copied as a symlink...
ln -s ../../../tmp/xxx reflink (gets backed up as a symlink) ln -s /tmp/xxx rootlink (the whole folder gets backed up)
In other software I've used, it's either always copy symlink or always follow symlinks.
If anyone else wants to copy the symlink only always, you can do it by commenting out this in duplicacy_entry.go...
else if path == "" && filepath.IsAbs(entry.Link) && !strings.HasPrefix(entry.Link, normalizedTop) { ... }