Linux 服务器上的 Dropbox - 如何包含/排除文件夹?

Cam*_*ata 20 dropbox web-server

使用 Dropbox GUI,可以具体控制要同步的文件夹。这也可以从命令行以某种方式完成吗?

背景:我正在尝试在此处给出的 linux 服务器上安装 Dropbox 的解决方案,它似乎工作正常:http : //ubuntuservergui.com/ubuntu-server-guide/install-dropbox-ubuntu-server

小智 22

官方 Dropbox CLI 有一个排除选项

在 Linux 上,Dropbox 有一个客户端 ( dropbox) 和一个守护进程 ( dropboxd)。

客户端有exclude命令,您可以使用它来排除目录。例如,要从 Dropbox 中排除 node_modules,您可以输入dropbox exclude add ./node_modules

dropbox help exclude 将打印帮助信息:

dropbox exclude [list]
dropbox exclude add [DIRECTORY] [DIRECTORY] ...
dropbox exclude remove [DIRECTORY] [DIRECTORY] ...

"list" prints a list of directories currently excluded from syncing.
"add" adds one or more directories to the exclusion list, then resynchronizes Dropbox.
"remove" removes one or more directories from the exclusion list, then resynchronizes Dropbox.
With no arguments, executes "list".
Any specified path must be within Dropbox.
Run Code Online (Sandbox Code Playgroud)

  • 有没有办法在不运行 dropbox 守护程序的情况下进行配置? (8认同)
  • @PiotrDobrogost 问题是,如果我有一个 500 GB 的 Dropbox,我必须下载所有 500 GB 才能应用排除,因为守护进程在应用排除之前等待初始同步完成。不幸的是,我们中的许多人在我们的机器上没有 500 GB,所以我们根本无法使用它。 (3认同)

Luc*_*ani 6

想象一下 Dropbox 根目录下有一个名为“YOURFOLDER”的文件夹

1 - 提示:cd ~/Dropbox

2 - 按输入键

3 - 提示:dropbox exclude add ~/Dropbox/YOURFOLDER

4 - 按输入键

确认

1 - 提示:dropbox exclude list

2 - 按输入键

将出现排除文件夹的列表:

排除:../../../root/Dropbox/YOURFOLDER


小智 6

我发现行为最近发生了变化,dropbox exclude现在似乎影响了“选择性同步”,即“您在 Dropbox 云上有一个不想同步到本地计算机的文件夹”而不是“您在您不想同步到保管箱的本地计算机”

你会想要忽略文件

attr -s com.dropbox.ignored -V 1 somefolder
Run Code Online (Sandbox Code Playgroud)