In this article we’ll go over the details to configure Dropbox to handle automatic backups. Along with all of this, we’ll discuss why you’d want a backup system on your Linux desktop and go over a few other solutions for those not interested in “the cloud.” Let’s get started!

Installation

For backing up, we won’t be using the official sync client. Instead, we’ll be using Dropbox Uploader. It is a fairly complex bash script that allows for automating backups directly to Dropbox. Start by opening a terminal and getting the code via git. Note: you will need to install the package “git” on your system, or this command will not work. When these four commands are entered, a screen will appear and prompt the user. Log into Dropbox and head over to this page. In order for this script to work, an access token needs to be created. Go here and click “create.” On the next page fill out all of the information to create your app. When prompted, click “Dropbox API.”

When all the information is filled out, you will have created your Dropbox app. The next step is to generate your access token. Look for it on the page, click the “Generate token,” and copy it to your clipboard.

Take the token and paste it into the terminal where the script prompts “access token.” With the access token added, make the backup directory:

Setting up automated backups

Setting the automated backup system is done with Cron. Cron is a system that allows users to schedule different types of commands. Open a terminal and edit the default crontab. Cron may not be installed. Search your Linux package manager for cron, cronie or something similar and install it. Paste the following into the crontab once you’ve edited it to fit your needs: This cron command will automatically run the backup (You can change the file or folders that you want to back up.) on every Saturday and upload it to Dropbox at 7:04am. With the code pasted, press “Ctrl + o” to write out the file. Note: If you’re only backing up small files, the free storage Dropbox offers will be more than enough. If you need more storage, you will have to upgrade your account to a premium plan. In addition, the above code only compresses your backup files. It doesn’t encrypt your data. You might want to consider encrypting it before syncing to Dropbox.

Why Dropbox?

Dropbox on Linux is perhaps one of the most commonly used cloud storage solutions out there. They provide a desktop client for Linux (unlike Drive or OneDrive). Using this service, users will actually get to sync data with a desktop client instead of uploading files through a web interface. Another reason why Dropbox should seriously be considered as a backup solution is the fact that it is cross-platform. Your data backups can be accessed and even modified from your Android or iPhone along with your Windows or Mac. Solutions using Rsync are nice but not good enough in this respect.

Other Solutions

The automated Dropbox backup system is neat, and most users will find it useful that their file backups automatically show up inside their Dropbox account. However, Dropbox isn’t for everyone. Let’s briefly go over three good alternatives for creating backups on Linux.

1. Back in Time

Back in Time is a schedule-able backup solution for Linux that works based on snapshots. Install it on Ubuntu with: or Back in Time is a good solution for those looking to create quick snapshots of directories and keep incremental backups of data. Learn more here.

2. Deja Dup

A good backup system for those not looking to follow the Dropbox method is Deja Dup. It, too, can do automated backups on Linux and works on a very easy programmable schedule. Want to learn how to set it up? Go to this article and learn more about it!

3. Gnome Disks

Gnome Disks handles backup a little differently than the other solutions on this list. For starters, Gnome Disks doesn’t do automated backups. Instead, users can manually take complete snapshots of partitions and hard drives for storage later. Though this sounds like a bit much, it’s actually a really elegant solution. With this tool, you can even back up your existing Linux installation or media collection and keep it exactly the way it is. If you’re reading through this guide and want manual backups of your data instead, this solution is for you. Learn all about backing up with this solution here.

Conclusion

Though many people do not bother with this on Linux, having a good backup system means that your data will always be safe and secure. Whether it be making a disk image or keeping critical files in cloud storage, snapshots or incremental backups, protecting your data is important. Hopefully, with this article, those putting off setting up a backup solution for their Linux desktop will realize how important this is and take steps to protect critical data.