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
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 enterdropbox exclude add ./node_modules
dropbox help exclude
will print the help information:I've found the behaviour has changed recently and
dropbox exclude
now seems to affect the "Selective Sync" i.e "You have a folder on the dropbox cloud that you do not want to sync to the local machine" instead of "You have a folder on the local machine that you do not want to sync to dropbox"You will want to ignore files instead.
Imagine a folder on root of Dropbox named "YOURFOLDER"
1 - Tip:
cd ~/Dropbox
2 - Press Enter
3 - Tip:
dropbox exclude add ~/Dropbox/YOURFOLDER
4 - Press Enter
To confirm
1 - tip:
dropbox exclude list
2 - Press Enter
A list of excluded folders will appear:
Excluded: ../../../root/Dropbox/YOURFOLDER
For the most part the Dropbox CLI works well. Here are a few gotchas I've found with Ubuntu Server (14.04).
cd ~/Dropbox\ \(blah\)/
and then to exclude the directory~/Dropbox (blah)$ ~/bin/dropbox.py exclude add /home/<USERNAME>/Dropbox\ \(blah\)/somefolder
.This will find and exclude folders ".llgal" from photo gallery of 2016 year:
dropbox exclude add $(find /home/dcp/Dropbox/Galeria_Fotos/2016/ -iname \.llgal | tr '\n' ' ')
I know that is not what you requested but maybe can help other people.
I'm looking for a solution like modifying the database of dropbox, because I have problems with dropbox busy too.
Regards