There is a hardcoded behavior to skip backing up contents of the .duplicacy directory in
func ListEntries(top string, path string, fileList *[]*Entry, patterns []string, nobackupFile string, discardAttributes bool) (directoryList []*Entry,
skippedFiles []string, err error) {
...
for _, f := range files {
if f.Name() == DUPLICACY_DIRECTORY {
continue
}
...
I sort of understand why it is done, but I think it is ill-advised and I disagree. So, step by step:
Why this directory shall be backed up?
Easy. It contains user created content: filters, preferences, schedule, scripts, even private keys for destination storage. No user created content shall ever be lost. Now I have to do stupid stuff like keep those files elsewhere and symlink them to under .duplicacy to have them backed up.
Why I think it is actively skipped now?
I think it’s because it also contains cache
and logs
.
So, would it be great if we only skipped .duplciacy/logs and .duplicacy/cache from backup instead then ?
Not really. This would be better, but not ideal. The ideal behavior would be as follows:
- Place cache files where they belong, under
~/Library/Caches
. Similar thing on Windows. - Place log files where they belong, under
~/Library/Logs
- Set excludeItem extended attribute on caches and honor it
- Do not set that attribute on Logs: Let user decide if they want to backup logs. I would.
- Remove that explicit check for duplicacy directory from the source.