dropbox / dbxcli

A command line client for Dropbox built using the Go SDK
Other
1.05k stars 101 forks source link

Add selective sync command #101

Closed Poky85 closed 5 years ago

Poky85 commented 6 years ago

My Dropbox shows following warning:

Your account has 740,000 files. If you sync more than 500,000 files, syncing take a while.

In fact, I do not use Dropbox so intensively. My usage is ~ 100 GB. But I have huge amount (~ 530,000) of small files in folders like node_modules.

It would be nice to have a way to programmatically mark such folders for selective sync.

ghost commented 5 years ago

I could create my own BASH script if the "ls" command also came with a hash, such as MD5.

Could you implement this? ...

ghost commented 5 years ago

I wrote a code in BASH for synchronization, it works perfectly, with one detail: in order not to abuse data transfer and processing, synchronization is performed by a command, with the "tocloud" argument, synchronizing from the disk to the cloud, or with the "tolocal" argument, from cloud to disk.

You can download the scripts and make the changes that suit you best.

https://www.dropbox.com/sh/de3738mwb69gc3b/AAB-fWfh7Uf0-RfpBEQuQ2XRa?dl=0

rofrol commented 5 years ago

Try rclone? https://github.com/dropbox/dbxcli/issues/60#issuecomment-497713363

borkdude commented 5 years ago

I thought this was supported with a tool I used a few years ago called dropbox-cli. This had an option exclude.

zouhairm commented 5 years ago

@borkdude - I think you might be referring to https://help.dropbox.com/installs-integrations/desktop/linux-commands which indeed has an exclude command. Unfortunately that CLI is only available for Linux (no OSX or windows support).

Not sure how dbxcli works and if that's something that'd be possible to expose at all ... but if it supported the exclude command, it would allow implementing things like .dbignore (http://konolige.com/dbignore/) which has to be the most requested feature (780+ comments) on the dropbox forum .

borkdude commented 5 years ago

@zouhairm Indeed, linux CLI supports it, but Mac has no CLI. I think the difference between the linux CLI and dbxcli is that the latter talks to the Dropbox API, but does nothing with local configuration, so you can't use it for selective sync if I understand correctly.

zouhairm commented 5 years ago

Thanks for explaining how that works. It's really unfortunate. I've had to simply move some projects out of dropbox due to folders (mostly node_modules and some other autogenerated files from my project) that I have no way to easily ignore. I have to do it on a per project basis and can't set rules, so it's limiting.

Really surprised dropbox team hasn't addressed this. I should dust up my rolodex and see if I know any engineers there :p

lfaraone commented 5 years ago

Selective sync settings are per-device, except for team folders. dbxcli operates without a local Dropbox client, and instead operates on the Dropbox API as @borkdude notes.

Since there isn't any API we could be calling here to accomplish this feature request, I'm closing this issue.