Dropbox on Linux Server – How to Include/Exclude Folders

dropboxweb-server

Using the Dropbox GUI, it's possible to controll specifically what folders to be synced. Can this somehow be done from the command-line too?

Background: I'm trying out the solutions for installing Dropbox on a linux server given here, and it seems to work fine:
http://ubuntuservergui.com/ubuntu-server-guide/install-dropbox-ubuntu-server

Best Answer

The official Dropbox CLI has an exclude option.

On Linux Dropbox has a client (dropbox) and a deamon (dropboxd).

The client has the exclude command, which you can use to exclude directories. E.g. to exclude node_modules from Dropbox you can enter dropbox exclude add ./node_modules

dropbox help exclude will print the help information:

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.
Related Topic