We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
Jeff_S1
5 years agoExplorer | Level 3
sync only one folder on linux
I have a huge dropbox business account, and I'd like to sync one "deep" folder on a linux client. This folder is deep in the folder hierarchy, so for example the folder: "folder 1/folder 2/folder 3" is the ONLY one I want downloaded to the linux client.
I tried: dropbox.py exclude add * ; dropbox.py exclude remove 'folder 1/folder 2/folder 3'
and various permutations of that, but I always still end up with:
dropbox.py exclude list
Excluded:
folder 1
What's the magical set of commands I need to issue to exclude everything - except one deep folder?
Or, do I need to create local paths for this deep folder on the client first?
23 Replies
Replies have been turned off for this discussion
- Walter5 years ago
Dropbox Community Moderator
Hey Jeff_S1; welcome aboard and thanks for using Dropbox!
Just to make sure we're on the same page, can you please let me know if you're fully synced on this machine by running the status command?
Keep us posted! - Jeff_S15 years agoExplorer | Level 3
No, I have not fully synced. that would take more than 10TB of data, of which I only need about 600GB (the one deep folder). I'm trying to avoid that huge, unneeded sync. So, this is a new, empty machine, that I've installed dropbox.py and activated - but has not synced.
- Здравко5 years agoLegendary | Level 20
Hi Jeff_S1,
Seems, you are thinking in exactly opposite way instead of what "Selective Sync" implementation assumes to. 🙂 As seems you have noticed (to some extent) that using command (or GUI) folder tend to be excluded, not included, so how exactly you can add a subfolder in a missing (excluded) folder?! 🧐 Try to do the same trick using GUI (not necessary on Linux). Do you able? 🙄 What's the problem? 😉 Using the command prompt is the same! Execute on command line the equivalent things you are doing on GUI. Unchecking particular folder means adding to "exclude list" and checking the same folder means removing from "exclude list". Take in mind that in GUI when you set check mark to a nested folder all containing folders receive check mark too. In console you have to do this by hand! This is NOT done by the control script for you! This could be object of improvements (not to say it's a bug). When adding folders you have to add nested folders from outermost to innermost folder... Or better opposite, instead of exclude all and after that to try add some of them, just exclude folders you don't want to be in sync locally. Nothing special, the same commands (even one less) in right order. 😉
Hope this gives right direction.
- Jeff_S15 years agoExplorer | Level 3
Ahh, OK. This makes sense. So, I need to include folder 1. Then exclude all children of folder 1. Something like:
dropbox.py exclude remove ~/Dropbox/folder 1
dropbox.py exclude add ~/Dropbox/folder 1/*
dropbox.py exclude remove ~/Dropbox/folder 1/folder 2
dropbox.py exclude add ~/Dropbox/folder 1/folder 2/*
dropbox.py exclude remove ~/Dropbox/folder 1/folder 2/folder 3
I'll give that a try...
- jamespi5 years agoHelpful | Level 5
Did you get this to work? I have a problem where I can't sync the single folder I want, because despite excluding all the other folders, dropbox still wants to download all of them first before then deleting the excluded ones. This doesn't work because my hard drive is not big enough to sync the entire dropbox folder.
I can't find a way to set up the exclude list in advance before syncing, and having it not even attempt to download the excluded folders. You mention having a 10TB dropbox, so I imagine this is a problem you would run into as well, unless I'm just being dumb somehow. - Jay5 years ago
Dropbox Community Moderator
Hi jamespi, thanks for your message. I'd recommend contacting the support team to look into this matter in more detail. - Concerned Citizen4 years agoHelpful | Level 6
I would suggest this is a common use case and should be treated as a mainstream use of the product. I'm setting up a Minecraft server on Digital Ocean and just assumed it'd be easy to use Dropbox in this fashion. All I wanted to do was basically sync a directory like Games/Minecraft to this droplet, without having to first sync the entire service (which is prohibitively large for this VM). We need an --exclude * and then --include foo type of mechanism.
- sydsyd3 years agoHelpful | Level 5
Just wondering if this question was ever resolved/fixed.
I too would like to only have one folder, on the top level, of an account synced on my Linux headless server without having to have the whole account synced first before I can exclude all other folders.
- Walter3 years ago
Dropbox Community Moderator
Hey sydsyd, have you tried pausing syncing and then resuming it after having excluded the folders you don't want to be synced to your device?
- sydsyd3 years agoHelpful | Level 5
Hi Walter - I've found another workaround which is to just share a specific folder with another Dropbox.
This avoids syncing and excluding.
But pausing the sync after setting up the link was going to be my next step.
I think all of this can be avoided if there was a config file that could be read by the dropbox linux daemon to not sync specific folders in a list.
About View, download, and export
Need support with viewing, downloading, and exporting files and folders from your Dropbox account? Find help from the Dropbox Community.
Need More Support
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!