How to setup Dropbox on Linux server

dropbox-linux

This post keeps tutorial character. The goal – explain easy way to sync data between Linux and remote location. With further opportunity to reach them from every point of world.

What is the Dropbox?


Dropbox is a storage engine which helps you to easily sync any files between many sources. The sources role could play PC, laptop, phone, web-cloud and anywhere else. It’s wider than Google Drive and similar cloud storages. With Dropbox you don’t need to manually upload and download data day by day. Dropbox engine does it for you.

How can it help me doing operations?


Backups, my friend! Doesn’t a perfect to store your data on another side of the world? If your datacenter will be fired or flooded – you can simply restore necessary files. Dropbox syncs data by HTTPS. So, don’t take any worries about data sniffing when you allow to send your files on Internet. Upgrading your Dropbox account plan, you’ll get more opportunities to enhance backup environment.

And this is just a one option. You may apply it anywhere you need to keep files freshed. Dropbox supports CLI installation from Linux command prompt. That’s the most important moment which makes servers orchestration much more easier.

How to install?


1. Get Dropbox to your home directory

cd
wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86_64"

2. Unarchive source and run install script as from CLI environment

tar -xvzf dropbox.tar.gz
env - LANG="$LANG" ~/.dropbox-dist/dropboxd &

You’ll get a generated URL after successful script running. Go there by your browser. You should see the message you added new device to your Dropbox storage. Also you’ll have e-mail notification. It means you won’t miss the situation when someone tries to compromise your data.

3. Get pythonized Dropbox CLI agent

mkdir -p ~/bin  
wget -O ~/bin/dropbox.py "http://www.dropbox.com/download?dl=packages/dropbox.py"  
chmod 755 ~/bin/dropbox.py  
~/bin/dropbox.py help #testing CLI launch

4. Add Dropbox daemon to startup

Description of this step is special for each Linux distro. To realise the startup script for Dropbox, please, read this tutorial.

Goddamn, too many steps. Anything easier?


Yeah, sure! You can use my Ansible role for Dropbox. The great option will be:

  • play this role for few servers
  • put in one of them some files…
  • …and it will be synced on all deployed Dropbox environments!

Have fun and stop to busy your friends with file synchronization issue.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s