Synology Drive Blacklist (File Filter)
Synology Drive lets you exclude folders and files from syncing via its "blacklist" filter. This is configured per-machine in the Synology Drive Client app.
How it was originally configured
I'm ~90% sure I configured the blacklist during the initial sync task setup wizard when creating the On-Demand Sync task on May 19, 2024. The wizard appears to offer a filter/blacklist step before the task is created. Once the task exists, the "Sync Rules" UI in the client becomes greyed out — but the per-session config file it wrote is still editable on disk.
(Evidence: the Synology Drive UI log shows wizard-utility.cpp: prepareFilter writing
to the per-session blacklist file when session 3 was created.)
How to edit it now
The Synology Drive Client's "Sync Rules" UI is greyed out for On-Demand Sync tasks, and the Synology Drive Admin Console in DSM doesn't expose these settings either.
Edit the per-session blacklist filter file directly (no sudo needed):
vim ~/Library/Application\ Support/SynologyDrive/data/session/3/conf/blacklist.filter
(The 3 is the session ID for the On-Demand Sync task. You can find yours in
~/Library/Application Support/SynologyDrive/data/db/sys.sqlite session_table.)
The current contents of this file:
[Version] major = 1 minor = 1 [Common] black_dir_prefix = "/Backup", "node_modules", ".git", ".github", "log", "tmp", "venv", ".venv", "__pycache__" max_length = 0 max_path = 0 [File] black_ext = "tmp", ".ds_store", ".DS_Store" max_size = 0 [Directory] black_name = "node_modules", "venv", ".venv", ".git", ".cache", "__pycache__" [EA]
Restart Synology Drive Client after editing. The rules also get loaded into a SQLite
database at ~/Library/Application Support/SynologyDrive/data/db/filter.sqlite.
Note: There is also a blacklist.filter inside the .app bundle at
SynologyDrive.app/Contents/Resources/conf/blacklist.filter — that one is the
system default and gets overwritten by app updates. The per-session file above
is the one you actually want to edit.
To verify current active rules:
sqlite3 ~/Library/Application\ Support/SynologyDrive/data/db/filter.sqlite \ "SELECT * FROM filter_table;"
My current blacklist
Folder names excluded from sync (filter type -13):
.git— git history stays local per machine, GitHub is the source of truth.github.venv— Python virtual environmentsvenv— same, alternate namingnode_modules— npm packages__pycache__— Python bytecode cachetmplog/Backup
File names excluded (filter type -2):
..DS_Store..ds_store.tmp
File size excluded (filter type -15):
- Files over 0 bytes — (this may be a default/placeholder)
Where the config lives
The filter rules are stored in a SQLite database at:
~/Library/Application Support/SynologyDrive/data/db/filter.sqlite
You can inspect them with:
sqlite3 ~/Library/Application\ Support/SynologyDrive/data/db/filter.sqlite "SELECT * FROM filter_table;"