Skip to content
forked from ldx/DBdownload

A simple one-way Dropbox sync client in Python

License

Notifications You must be signed in to change notification settings

jupdike/DBdownload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBdownload

Now requires Python 3

DBdownload is a simple Dropbox client written in Python. It does one-way synchronization from a directory in your Dropbox account to a local directory. The local folder will be kept in sync with your Dropbox folder, so if anything is updated, removed or added on Dropbox, it will be downloaded and kept updated in your local folder. Local changes will be overwritten - it's one-way only.

Why?

I just tried to install and use the official Dropbox client on a low-end VPS, and the OOM kept killing it because it was such a memory hog. Frustrated by not being able to simply sync a folder to my box, I checked out whether I could hack together a simple client which only did one-way synchronization. DBdownload is the result.

Install

  • Fetch DBdownload, e.g., with

      $ git clone https://github.com/jupdike/DBdownload.git
    
  • Install (this will also install all necessary dependencies, if missing):

      $ python setup.py install
    
  • If dropbox module is missing, simply do

      $ pip3 install dropbox
    

Uninstall

Once installed, DBdownload can be removed from the system with:

$ pip3 uninstall dbdownload

Get an access token (64 chars long) from Dropbox

And write that to a secure location, then

$ python3 download.py --token `cat ../MY/PATH/dropbox-access-token-filename.txt` FROM-Dropbox-DIR TO-local-DIR

(OLD Instructions) Use

Just launch DBdownload and specify the source Dropbox directory you would like to sync to your local computer, and the target folder it should be synced into. If the local folder does not exist DBdownload will create it, if it is used, it will be cleared first.

$ dbdownload -s test -t /tmp/test
URL: https://www.dropbox.com/1/oauth/authorize?oauth_token=fjlkadf8a7dfjxy
Please authorize this URL in the browser and then press enter

If this is the first time DBdownload is started, it will request access to your Dropbox data. Just open the link in your browser:

Dropbox authentication

and allow access to your Dropbox:

Dropbox authentication

Get back to the console, press enter, and if you have allowed access, DBdownload should start synchronizing your Dropbox source folder to the target directory.

DBdownload has quite some flags and optional parameters, check them out:

$ dbdownload --help

About

A simple one-way Dropbox sync client in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%