dropbox / dbxcli

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

Add sync command #53

Open Luzifer opened 8 years ago

Luzifer commented 8 years ago

Usecase

I'm automatically downloading files on a headless Linux server for one of our team having near to no technical knowledge from a SFTP host and providing those files (filtered) to that team in a Dropbox folder.

Current way to use dbxcli

This has multiple disadvantages:

Advantages:

grantseltzer commented 8 years ago

What exactly would happen if I execute sync? Upload all files from source to destination? Or am I misinterpreting your proposal?

Luzifer commented 8 years ago

It should behave like rsync does. Checking which files to upload and then upload them.

Like I was doing a rsync --checksum local/folder/ dropbox://folder/inside/dropbox/ or vice versa…

hut8 commented 8 years ago

A command called sync, to me, would also download each of the files that are missing locally. But then there's the issue of conflicts. How would you be able to figure out whether the local version or the remote version should be the one that gets uploaded? This seems like it would get into the territory of the official dropbox client, which continually syncs things to get closer to avoiding that problem.

grantseltzer commented 8 years ago

We may be able to just add a --sync flag to the put command. #54, if it gets merged, will add multiple arguments to put as well.

skirmess commented 7 years ago

I think a better solution would be to offer a push and a pull command instead of a sync command. That's what odeke-em/drive did for Google Drive.

khalwat commented 7 years ago

FWIW, the awscli offers a similar sync functionality to what is being proposed here:

http://docs.aws.amazon.com/cli/latest/reference/s3/sync.html

igrep commented 6 years ago

I also want this feature because my Dropbox account has so many files that the desktop app can't handle well (over 700k files). With this feature, I can synchronize the folders only when needed, disabling synchronizing folders with many files but infrequently updated (and I want to have the contents both at the local and remote).

rofrol commented 5 years ago

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

tashrifbillah commented 4 years ago

Hi all,

dbxcli put search brought me here. So, I am just putting in an example command for uploading files that I figured:

dbxcli put myfile /myfolder/myfile

Then, follow the instruction on the command line for authentication. I hope it helps folks like me reaching here.

shadiakiki1986 commented 3 years ago

I created dbxcli-extras as a CLI that calls dbxcli to solve this and sync a local directory to a dropbox directory.