Directories still being included with -nobackup-file

I’m trying to use the -nobackup-file option with version 2.6.1 CLI on OS X and getting an unexpected result. The contents of all directories that contain my defined nobackup-file (.nobackup in this case) are correctly excluded from a backup. The problem is that the directories themselves are still being included so that when I do a restore, I get a number of empty directories.

As I understand it, the -nobackup-file option should exclude both the contents and the directory itself. Since it’s correctly excluding files in folders with the .nobackup file it appears that I configured it correctly. Is there some other setting that also affects this behavior?

I should add that the empty directories are not shown in the tree view on the Restore tab using Web Edition 1.4.0. And curiously, the .DS_Store files that I have excluded are shown in that view even though they do not get restored.

Anybody have thoughts on this? The documentation doesn’t seem to be consistent with the current behavior.

On the page for the set command it describes it as follows:

-nobackup-file <file name> Directories containing a file with this name will not be backed up

This behavior is caused by the implementation – the directory must be listed in order to find the nobackup file, but when the directory is listed it has already been added to the file/directory list. I’ll check the code to see if there is an easy way to exclude such directories.

1 Like

That makes sense. Thanks for the clarification.

While I have your attention, is there a way to use the set command to enable the --nobackup-file feature with the Web-UI before a backup is run for the first time?

I see there’s ~/.duplicacy-web/repositories/localhost/all/.duplicacy/preferences but setting the --nobackup-file option there doesn’t get inherited by the new repository. Setting it in the new repository works once it’s created but since only seems to be created after a backup has run at least once that defeats the purpose of ignoring those folders from the start.