Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sync command #53

Open
Luzifer opened this issue Sep 22, 2016 · 10 comments
Open

Add sync command #53

Luzifer opened this issue Sep 22, 2016 · 10 comments

Comments

@Luzifer
Copy link

Luzifer commented Sep 22, 2016

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

  • Use find to list all files
  • For each file execute dbxcli put ${file} ${target}

This has multiple disadvantages:

  • DNS blocking using block-api.g1.dropbox.com
  • Requests for files not required to sync

Expected solution

  • Call dbxcli sync ${source_folder} ${target_folder}

Advantages:

  • Files are synced when required but not every time
  • Fewer DNS requests / connections to establish
  • More efficient sync (better for local system / better for Dropbox servers)
  • Sync can be executed parallel instead of sequentially saving even more time
@grantseltzer
Copy link
Contributor

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

@Luzifer
Copy link
Author

Luzifer commented Sep 28, 2016

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
Copy link
Contributor

hut8 commented Oct 14, 2016

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
Copy link
Contributor

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
Copy link

skirmess commented Jan 28, 2017

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
Copy link

khalwat commented Apr 5, 2017

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
Copy link

igrep commented Jun 25, 2018

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
Copy link

rofrol commented May 31, 2019

Try rclone #60 (comment)

@tashrifbillah
Copy link

tashrifbillah commented Oct 22, 2020

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

  • I had to create myfolder in my dropbox account first
  • Specification of the last myfile was necessary

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

@shadiakiki1986
Copy link

shadiakiki1986 commented Jul 23, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants