Symlinks not showing up in snapshot list

I’m using Duplicacy CLI 2.2.1 on Windows 10. I’ve been backing up my user directory which contains many hidden symlinks windows uses to maintain backwards compatibility with older versions (e.g. user/Application Data).

I don’t mind this too much, however, when a snapshot is restored these symlinks are recreated pointing to live data locations. You need to be very careful when managing the restored data because deleting it with a recursive delete operation can result in actual live data getting wiped out since symlinks are pointing there.

Going forward, I’d just like to exclude these symlinks from my backups. I’ve added the necessary exclude filters and verified Duplicacy is ignoring the symlinks them with -enum-only. The problem I’m running into is that they are still restored when I restore a snapshop that was backed up after updating the exclude filters.

Running a list -files command on the lastest snapshot revision does not show the smylinks at all. However, when I restore that revision they are still recreated.

How is it that the symlinks are not getting listed in the file list but still being recreated after a restore?


I sort of disagree here – it depends of what you need and choice of tools should reflect that: the del will follow symlinks, it’s just wrong tool to use if you want to delete the symlink instead. rmdir for example should not follow symlinks; it would delete the link itself. Symlink is a file so duplicacy backs it up and restores as a file. The “contents” of the file is a pointer to another object in the filesystem and it is backed up and restored as is, by design; Duplicacy does not follow symbolic links on second and deeper levels.

This is really strange. Can you post relevant pieces of your filters file to illustrate how do you exclude the symlink? I’m asking because this: Revisiting filters - no love for me

list -files shows only files, not directories or symlinks.

cat -r revision will show the symlinks.

Completely follow you here. I do manually remove the symlinks with rmdir vs del. However, most other backup products I’ve used either follow all symlinks and backup the targets or don’t restore symlinks to live locations. In either case you can just restore, get the files you need, and blow it all way without any concern. Not the case with duplicacy. Not knocking it (I’m happily using it), just trying to make it less error prone for when I have to do a restore in a year or two and don’t recall this subtlety.

While investigating my filters file to give examples, I found the problem! I had a slight misspelling of two of the names. Corrected and all is working now. Thanks for the help!

1 Like