Giter VIP home page Giter VIP logo

dropbox-sync's Introduction

dropbox-sync

dropbox-sync is a simple command line tool to setup syncing files and directories outside of your Dropbox folders using symlinks. This is especially useful for applications for which you want to synchronize data between different machines, but the application expects it files to be on a certain location. This tool will create a symlink in your ~/Dropbox/Sync folder to any path you specify. Dropbox will follow this link and synchronize the contents of the original location. This tool can then setup these links easily on other machines as well to complete your synchronization setup.

Installation

gem install dropbox-sync

Warnings

This tool is tested on Mac OSX 10.6. It should work on other OSX versions and Linux too, but this is untested. Before using the tool, always wait until Dropbox finishes syncing everything, and then close the Dropbox application. This will make sure Dropbox does not interfere with this tools operations and the other way around.

Final note: not every application is suitable for this synchronization using Dropbox.

Usage example

Say, you want to synchronize your Address Book contacts on Mac OS X. First, use this tool to synchronize the Address Book folder: ~/Library/Application Support/AddressBook. Run the following command:

dropbox-sync sync "~/Library/Application Support/AddressBook"

This will create a symlink ~/Dropbox/Sync/AddressBook. Dropbox will start uploading the contents of the folder to your Dropbox account.

On the other machine, wait until Dropbox finishes synchronizing and then quit the application. Instead of a symlink, Dropbox will have created a folder called ~/Dropbox/Sync/AddressBook with all the contents in it. The folder needs to be moved to the original location in ~/Library so Address Book picks it up. Moreover, we also want to create a symlink on this machine, so any changes on this machine will be synced to Dropbox as well. Run the following command:

dropbox-sync setup

This will move the folder fro the ~/Dropbox/Sync folder to the original location and create a symlink instead. Note that usually, there will already a local AddressBook folder around in ~/Library/Application Support. This folder will be moved to ~/Library/Application Support/AddressBook.local_backup so you won’t lose it. You can always move this folder back into it’s original location to get your local Address Book back.

The setup command can be run every time there is a change to your Dropbox configuration. It will only setup links that have not yet been set up before on the machine.

Other commands and options

dropbox-sync list

This will display a list of all the files and directories that are currently being synced.

dropbox-sync unsync <path>

This will “forget” the sync link between your local path and the Dropbox path. The files will be kept both locally and on Dropbox.

dropbox-sync destroy <path>

This will destroy the sync link between your local path and the Dropbox path. Your local files will be kept around, but they will be removed from Dropbox.

--dropbox-dir <path>

If you are not using the default ~/Dropbox folder on your system, you should provide the --dropbox-dir <dropbox-path> option to every command.

License

MIT.

dropbox-sync's People

Contributors

wvanbergen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.