Set up include/exclude patterns using the GUI

I am using the Duplicacy GUI to back up my user folder on macOS. I would like to exclude the Library folder but still back up two or three specific subfolders within it. Is there a way to do this through the GUI? I’ve searched the forum but haven’t been able to find an answer. Any help would be greatly appreciated. Thank you!

Yes, it’s doable, but doing it with buttons is abhorrently difficult. Order of statements in the filter file matters, and it’s hard to edit there.

Instead, put your filters in a separate text file, and in gui add a reference to that file

@/path/to/filters/file

An example of the filters file that would accomplish what you want is here: Unattended Duplicacy setup on macOS | Trinkets, Odds, and Ends

Thank you for the quick reply. That does sound a bit complicated and not quite as user-friendly as the rest of Duplicacy. I’m still testing it out, though. Could you perhaps provide a quick example? I only need to back up three specific folders from within the Library folder; the rest should remain excluded.

+Library/Containers/com.moneymoney-app.retail/Data/Library/Application Support/MoneyMoney/*
-Library/*
-.zsh_history
-.vuescanrc
-.DS_Store
-.CFUserTextEncoding
-Applications/*
-.zsh_sessions/*
-.ssh/*
-.local/*
-.cups/*
-.config/*
-.Trash/*

I believe I got it. Could someone please confirm, that there is no easier way than this in order to include only these two subfolders from within the Library folder?

+Library/
+Library/Mobile Documents/
+Library/Mobile Documents/com~apple~CloudDocs/*
+Library/Containers/
+Library/Containers/com.moneymoney-app.retail/
+Library/Containers/com.moneymoney-app.retail/Data/
+Library/Containers/com.moneymoney-app.retail/Data/Library/
+Library/Containers/com.moneymoney-app.retail/Data/Library/Application Support/
+Library/Containers/com.moneymoney-app.retail/Data/Library/Application Support/MoneyMoney/*
-Library/*
-.zsh_history
-.vuescanrc
-.DS_Store
-.CFUserTextEncoding
-Applications/*
-.zsh_sessions/*
-.ssh/*
-.local/*
-.cups/*
-.config/*
-.Trash/*

The example is in the article I linked to.

There is easier way, if you don’t mind a lot of empty folders in the backup.

# include all directories only
+*/

# include content of specific directories 
+Library/Mobile Documents/com~apple~CloudDocs/*
+Library/Containers/com.moneymoney-app.retail/*

# exclude everything else
-*

Separate note: you probably should not exclude .ssh, .DS_Store and other files. Better approach is to include everything and then explicitly exclude anything you definitely don’t need. That way if your apps change data layout backup will still contain your data.

It’s complex, not complicated. It’s described in the documentation: Include Exclude Patterns · gilbertchen/duplicacy Wiki · GitHub. I’d say it’s annoying, but pretty straightforward: duplicacy processes filters line by line and stops at the first match, for every object. The UI should have made the user experience selecting data to backup easier and generate that file as a result, but it does not.

Note, backing up iCloud Drive will only work predictably if you don’t have Optimize Mac storage enabled.

Thank you very much; I really appreciate it. I do like Duplicacy so far, but I agree, there should be a better and simpler way in the GUI to select specific folders for backup while excluding others and locking those settings. For example, if new folders appear in my user folder, I’d like them to be included automatically. However, if new folders appear in the Library folder, I want to restrict the backup to only the specific folders I’ve already chosen. Thanks again for the additional advice. I don’t use Optimize Mac Storage. I think I am all set. have a good weekend

For this you would need to modify it slightly.

# include all directories only, so that duplicacy can traverse everything 
# and avoid the need to specify explicit incremental paths
+*/

# include content of specific directories in Library
+Library/Mobile Documents/com~apple~CloudDocs/*
+Library/Containers/com.moneymoney-app.retail/*

# exclude everything  else from Library (which I don’t recommend doing still, 
# there is a lot of user data you may want to preserve, for example, keychain)
-Library/*

# include everything else. Note, you might want to exclude derivative stuff
# from PhotosLibrary as well 
+*

Recommended approach on macOS is to include everything. Things that need to be excluded are excluded automatically by Time Machine attributes, that duplicacy also honors. Then if you want to exclude specific things — use Time Machine exclusion mechanism to mark the data for exclusion.

E.g.

tmutil addexclusion ~/Downloads/UnnecessaryStuff

Wow, thank you! I really like Duplicacy; it seems to be fast. I’m an Apple user and have been using ARQ Backup for years, but I need cross-user deduplication. I do wish Duplicacy would provide more information directly through the Mac menu bar, though.

While the speed is not even in the top ten requirements for the backup tool — reliability, resilience to corruption, stability, maintainability, code simplicity goes way before speed — Duplicacy also happens to be the fastest on the market :slight_smile:

Compared to Arq, however, it lacks three things:

  • support for dataless files
  • support for archival storage tiers (like Glacier Deep Archive)
  • support for backing up all users on Mac without the need to jump through hoops.

It has been requested but I guess there is not much demand for that, it hasn’t been implemented as of today.

If you don’t need any of these — then duplicacy is the best choice (the CLI engine, I’m not using the WebUI because as you have noted, it doesn’t provide much value; just scheduling, which any os, including macOS already has built in). I’m using both.