侧边栏壁纸
  • 累计撰写 111 篇文章
  • 累计创建 48 个标签
  • 累计收到 6 条评论

目 录CONTENT

文章目录

Synology Drive Client 同步过滤目录文件夹

勤为径苦作舟
2025-11-19 / 0 评论 / 0 点赞 / 8 阅读 / 0 字

简介

同步规则里只有过滤文件的。

创建同步规则后立马暂停。
配置后需要重启软件

Windows

C:\Users\duanluan\AppData\Local\SynologyDrive\data\session\下有数字目录,数字顺序就是创建的同步规则顺序。
打开数字目录下conf\blacklist.filter[Directory]下新增black_name配置过滤文件夹,参考如下:

[Version]
major = 1
minor = 1

[Common]
max_length = 0
max_path = 0

[File]
black_suffix = ".lnk", ".bak", ".class", ".ear", ".iml", 
".ipr", ".iws", ".lnk", ".log", ".o", 
".obj", ".pst", ".pyc", ".pyo", ".suo", 
".swp", ".temp", ".tmp", ".user", ".war", 
"~"
max_size = 0

[Directory]
black_name = ".git", "node_modules", "venv", ".venv", "vendor",
"Pods", "target", "build", "dist", "generator",
"bin", "obj", ".idea", ".vscode", "__pycache__",
".pytest_cache", ".cache", ".mvn", ".bundle", ".local",
".mvn", ".gradle", ".fleet", "checkpoints", "temp", "tmp"

[EA]

Linux

Linux 在目录~/.SynologyDrive/data/session/下有数字目录,修改数字目录下conf\blacklist.filter

[Version]
major = 1
minor = 1

[Common]
black_dir_prefix = "/njcm"
max_length = 0
max_path = 0

[File]
black_suffix = ".lnk", ".bak", ".class", ".ear", ".iml", ".ipr", ".iws", ".lnk", ".log", ".o", ".obj", ".pst", ".pyc", ".pyo", ".suo", ".swp", ".temp", ".tmp", ".user", ".war", "~"

max_size = 0

[Directory]
black_name = ".git", "node_modules", "venv", ".venv", "vendor", "Pods", "target", "build", "dist", "generator", "bin", "obj", ".idea", ".vscode", "__pycache__", ".pytest_cache", ".cache", ".mvn", ".bundle", ".local", ".mvn", ".gradle", ".fleet", "checkpoints", "temp", "tmp"

[EA]

同时最好修改~/.SynologyDrive/SynologyDrive.app/conf/目录下的filterfilter-v4150文件:

[Version]
major = 1
minor = 1

[Common]
black_char = ":*?\"<>|\\/"
black_name = "@tmp", "@eaDir", ".SynologyWorkingDirectory", "#recycle", "desktop.ini", ".ds_store", "Icon\r", "thumbs.db", "$Recycle.Bin", "@sharebin", "System Volume Information", "Program Files", "Program Files (x86)", "ProgramData", "#snapshot"
max_length = 255
max_path = 2048

[File]
black_name = "@tmp", "@eaDir", ".SynologyWorkingDirectory", "#recycle", "desktop.ini", ".ds_store", "Icon\r", "thumbs.db", "$Recycle.Bin", "@sharebin", "tmp", "temp", "System Volume Information", "Program Files", "Program Files (x86)", "ProgramData", "#snapshot", ".lnk", ".bak", ".class", ".ear", ".iml", ".ipr", ".iws", ".lnk", ".log", ".o", ".obj", ".pst", ".pyc", ".pyo", ".suo", ".swp", ".temp", ".tmp", ".user", ".war", "~"
black_prefix = "~"
max_size = 0

[Directory]
black_name = "@tmp", "@eaDir", ".SynologyWorkingDirectory", "#recycle", "desktop.ini", ".ds_store", "Icon\r", "thumbs.db", "$Recycle.Bin", "@sharebin", "System Volume Information", "Program Files", "Program Files (x86)", "ProgramData", "#snapshot", ".git", "node_modules", "venv", ".venv", "vendor", "Pods", "target", "build", "dist", "generator", "bin", "obj", ".idea", ".vscode", "__pycache__", ".pytest_cache", ".cache", ".mvn", ".bundle", ".local", ".mvn", ".gradle", ".fleet", "checkpoints", "temp", "tmp"

[EA]

Mac

参考:https://github.com/LoicE5/synology-drive-ignore-nm

注意

client 里修改同步规则会清空black_name,需要重新配置。

参考

0

评论区