Tag Archives: dropbox on ubuntu server

Backup MySQL Database to Dropbox Using Backup Box

In this tutorial, we’ll learn that how we can take the backup of database using the tool named My Backup Box, which is nothing but just a website that is used to help transferring files between different services.

Create a free account using this link:

Read more of this post

How to Install and Configure Dropbox on Ubuntu Server 12.04 LTS

Dropbox is a file hosting service that offers cloud storage, file synchronization, and client software. In brief, Dropbox allows users to create a special folder on each of their computers, which Dropbox then synchronises so that it appears to be the same folder (with the same contents) regardless of the computer it is viewed on. In this tutorial, I will try to show you the steps to make dropbox features and services available on ubuntu server.

Download dropbox from it’s Official website:

Dropbox for 32-bit Server:

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

Dropbox for 64-bit Server:

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

Extract the Dropbox archieve:

tar -zxvf dropbox.tar.gz

Run the dropbox client deamon with this command:


Ubuntu server will keep showing this message after few second, if it is not link to any dropbox account yet.

Copy the highligeted text and paste into the browser on separate computer and Dropbox will ask for authentication:

It will ask the password again in order to link Ubuntu server to this dropbox account.

Once it succeeds you’ll see the message

Client successfully linked, Welcome!

on your server and it will stop printing the authorization link.

Press CTRL + C to terminate the dropbox deamon process.

The next step is to create a script to start and stop the dropbox daemon:

sudo touch /etc/init.d/dropbox
sudo nano /etc/init.d/dropbox

This script is lifted from here:

# dropbox service
# Replace with linux users you want to run Dropbox clients for
start() {
 echo "Starting dropbox..."
 for dbuser in $DROPBOX_USERS; do
 HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
 if [ -x $HOMEDIR/$DAEMON ]; then
 HOME="$HOMEDIR" start-stop-daemon -b -o -c $dbuser -S -u $dbuser -x $HOMEDIR/$DAEMON
stop() {
 echo "Stopping dropbox..."
 for dbuser in $DROPBOX_USERS; do
 HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
 if [ -x $HOMEDIR/$DAEMON ]; then
 start-stop-daemon -o -c $dbuser -K -u $dbuser -x $HOMEDIR/$DAEMON
status() {
 for dbuser in $DROPBOX_USERS; do
 dbpid=`pgrep -u $dbuser dropbox`
 if [ -z $dbpid ] ; then
 echo "dropboxd for USER $dbuser: not running."
 echo "dropboxd for USER $dbuser: running (pid $dbpid)"
case "$1" in
 echo "Usage: /etc/init.d/dropbox {start|stop|reload|force-reload|restart|status}"
 exit 1
exit 0

Note: Replace the user “arbab” with the user whom you want to run Dropbox client.

Make this script executable:

sudo chmod +x /etc/init.d/dropbox

Add it to default system startup run levels:

sudo update-rc.d dropbox defaults

Start the dropbox and check it’s status:

sudo service dropbox start
sudo service dropbox status

Download the dropbox.py script to check the Dropbox  real-time status:

wget -O ~/.dropbox/dropbox.py "http://www.dropbox.com/download?dl=packages/dropbox.py"

Change the permissions:

chmod 755 ~/.dropbox/dropbox.py

Check the status by executing this command:

.dropbox/dropbox.py status

By default, dropbox daemon create a  folder named “Dropbox” in the home directory of the user that we mentioned in the script (in my case that user was “arbab“):

cd Dropbox

Copy some data in this folder (Dropbox) and again check the status with python script:

.dropbox/dropbox.py status

Yes, it is working 🙂

Hope this will help you!

Please Remember me in your prayers!

%d bloggers like this: