In part 1 of this article, I shared a few of the frustrations and reasons why I decided to write my own backup utility rather than submit to the tyranny of currently available solutions. While some might find those ruminations interesting, the vast majority are probably far more interested in the end result. There is a reason why “Get to the point” is one of the most important sentences in the English language.
Here’s the short version: After becoming tremendously frustrated by the state of backup on Linux, I decided to take matters into my own hands and create my own tool.
And though I only want a few things, I want that tool to do each very well. First, I’m looking for a solution that can incrementally backup over the network and let me restore a file from an existing snapshot. Second, those snapshots should be compressed, encrypted and secure. Third, it should be easy to browse old backups for existing files and restoration should be a one-click affair. Fourth, I want a backup system that can protect me from disaster, carelessness and pathological stupidity.Time Drive is based on the excellent command line program, Duplicity though it was also inspired by another backup utility, Back In Time. Because it uses Duplicity for its backend, Time Drive plugs into the same industrial strength utilities used to backup and restore enormous sets of enterprise data. It just removes the industrial level complexity.
Like Back In Time for Linux and Time Machine for Mac OS X, Time Drive not only keeps a copy of the most recent file, but it remembers how that file looked at many points in the past. Put another way, it creates an incremental snapshot which lets you restore to a previous version should you so desire.
The Time Drive main window is designed to be simple and functional. Options related to backing up files are on the left, options related to restoring files are on the right. If you want to restore from a remote archive which is not currently specified in your settings, you can do so through the “Advanced Restore Options.”
Over the Network or Across the World
Backups can be made to remote servers and web services that support any one of the following protocols: file transfer protocol (ftp), secure shell (ssh), secure copy (scp), rsync, webdav (http), and secure webdav (https). Time Drive also supports backups to a locally attached drive or mounted volume. This includes shares that are mounted with virtual filesystems like sshfs, smbfs, and s3fs.
You can configure the remote backup by clicking on the general tab of the settings pane. Then, move the option to “Use a remote directory (SCP, WebDav or FTP).” From the drop down list, choose the communications protocol.
If making a backup to ftp or webdav (http), enter the name of the host and the path to your backup folder as a standard web url. It should look like:
For example, the backup path to my webdav share is:
If backing up by scp or ssh, you will need to use a second slash after the server name, for example:
Next, enter the username and password that you use to access the server and some sort of passkey in the “Encrypt Files” box. (While future versions of Time Drive will allow users to choose whether or not they wish to encrypt their files, this has not yet been implemented.) When finished, you can check the connection by clicking on the “Check Connection” button to the right of url text box. If Time Drive is able to connect to the store, a little green check mark will appear.
Should you delete a file that you needed, you can quickly browse or search the archive to find it and restore it. Need to restore a bunch of files? You can add as many as needed to the queue and then restore them with a single click. The restore dialog is accessed by clicking on the “Add files” button of the main window. The restore dialog itself allows you to browse the folders available in your backup, and any subfolders of the archive.
But what if you need access to a file in your work archive and you happen to be at home? Time Drive makes it easy to brose and restore from any archive, anywhere. Simply type in the url and click “Add files” to enter the restore files dialog.
Set It, Then Forget It
While Time Drive can be configured to work many different ways, file backup should ultimately be a very simple affair. True, it’s nice to have more advanced tools available, but most things in life aren’t really all that complicated.
As a result, setting up Time Drive for the first time is designed to be as easy as possible. First, pick where you want to perform your backups: either to the local machine, or across the network. Next, enter in a passkey to encrypt your backup files and keep them safe. Finally, choose which folders you want to see included in the job. When finished, click “Ok.”
Because each folder is a run as a separate duplicity script, you can always re-add that folder at a later time and Time-Drive will update the existing snapshot with the most recent information. All of the existing history will be there should you ever need to access it.
Time Drive also makes it easy to schedule automated backups through the use of the powerful crontab utility available on most *nix machines. Because it uses cron, there is no need to have a dedicated background process. (Though cron must be running for scheduled backups to work.)
Automated backups are configured by opening the settings dialog and navigating to the “Options” tab. Then, just pick how frequently you would like the program to run: every hour, day, week or month. When done, select “Ok.”
Notifications and Feedback
When looking at other solutions, I quickly became frustrated by the way which they handled user notifications. In some cases, the program provided a level of detail that was simply overwhelming. In others, it didn’t provide any feedback whatsoever; even when there was a problem.
With Time Drive, I’ve tried to split the difference. It uses the notification system of Ubuntu 9.04 and will let a user know when new backup jobs start and it finishes, if there is a problem, it will let you know that too. But for those who would rather not be bothered with such trivial things, the notifications can be easily disabled through the settings tab.
Even though Time Drive is relatively full featured and offers a convenient backup package, it is still beta software. That means that it needs to be tested, beat upon and otherwise tortured. As you do so, I would ask that you be a bit patient and mind the potholes. If it doesn’t quite meet your needs, please leave a bug report or feature request on the bugtracker page. Be as specific as possible and I will try to incorporate your ideas into the next release.
With Time Drive, I finally have a backup utility for Linux that does things right. It can backup to a computer on the network or across the internet; keeps incremental snapshots of only the files that have changed; makes file restoration a one-click affair; and keeps my personal information safe. What’s better, no tweaks or hacks are required to make it work the way that I want. In short, I finally have something that “Just Works” without having to stick some stupid qualifier in front.
If you are interested in downloading, testing or using Time Drive, you can find additional information on the project homepage. This includes installation instructions for Time Drive, Duplicity and PyQt in addition to the program documentation.