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.
It is a terrible thing to realize that you are stuck in a rut. Being in a rut effectively means that you’ve stopped advancing and life has evolved to monotony. No one likes to be around people in ruts, but it’s even worse to discover that you are personally trapped in one. And, most unfortunately, I am in a rut.
Don’t believe me? Take a look at the home page of this blog. You will likely notice that a full six of the ten most recent posts have dealt with one subject: backing up your computer. That’s pretty conclusive evidence of a rut.
Now, backing up your computer is a very important thing to do; you should do it regularly and have a plan. But … well … it’s boring. Talking, thinking and writing about nothing but backup is dull. As one of the doctors I work with likes to say, “That isn’t sexy. If I’m going to spend any time with it – women, food, wine; it doesn’t matter – it should be sexy.”
He’s got a valid point, backup is not “sexy” and I’d like to write about things that are, at least for a while. This, therefore, will be my last post on backups, archives, or servers for the relatively foreseeable future (technology is just too cool to lay it aside for too long). But before doing that, I want summarize where I ended up in my quest for the ultimate backup system.
Backup on Mac is taken care of, I use Time Machine to a Samba share. More adventurous persons than I might even say that this arrangement approaches sexy. It’s convenient, fast, and robust. It even covers disaster recovery.
But the third major operating system, Linux, is a bit of the odd-man out. Certainly, you can find some excellent backup systems, Back In Time is one such example. With a bit of work, you can even tweak it so that it is almost perfect. But it’s the “almost perfect” and closely related cousins (“mostly useful” and “good enough”) that are the problem. They have those stupid qualifiers – almost, mostly, enough – bolted on.
Any time you hear a qualifier, you can rest assured that you aren’t going to like what follows. Consider the rather innocuous phrase, “that may be a problem.” Here, the term “may,” makes an already bad situation much worse. Instead of specifying some probability of problemhood, it all but guarantees it. Positive qualifiers are just as bad.
As a result, it angers me that nearly every backup program available for Linux requires some kind of qualifier. It shouldn't be like this. Linux is a brilliant operating system in practically every way. It is highly integrated, wonderfully modular and tremendously easy to extend. So … after finding that nearly every backup utility in existence has failed to meet my needs, I found the situation intolerable and decided to do something about it.
The most recent versions of Microsoft Windows, Vista and Windows 7, include a wonderfully useful tool called Volume Shadow Copies. You can think of Volume Shadow Copies as insurance against momentary stupidity or negligence.
Consider that in any given day, the typical computer user (namely me) works with a lot of files. These include data, images, and text. As part of the workflow, I may be editing and combining changes to a document from many people. Over time, this can result in a great deal of cruft. Thus, while I’m working, I try and maintain some semblance of organization by applying edits to the most recent version and keeping a semi-automated log of the changes that have been made. Older versions of the document will typically be backed up in the subversion repository on my server, or in a dedicated archive.
However, in the process of shuffling and moving the digital detritus, occasionally I have accidentally deleted the wrong file. Which, invariably, happens while away from the backup server. Losing work is obnoxious, frustrating and embarrassing; thus, my healthy appreciation for Volume Shadow Copies.
On a regular schedule, Windows takes a picture of how your drive looks at that moment and saves it away. So, should you ever need to restore a lost file, you can use the Volume Shadow copies to do so. It’s even a relatively straightforward process. Simply right click on the folder you need to access and select “Properties.” Then, click on the “Previous Versions” tab and you will find a list of every snapshot that the computer has taken.
But while all versions of Windows have Volume Shadow Copies, Microsoft decided that only those who purchase the most expensive versions (Business, Enterprise and Ultimate) get the ability to use them. Home users are out of luck. The Shadow Copy service is still there, but you need a third party program to get at the stored information.
The open source Shadow Explorer is one such option. It’s free and gets the job done. But I recently stumbled upon a second alternative that is worth mentioning, Time Traveler, developed by Bears on the Loose Software.
While reading about Time Traveler, I learned something very interesting. Microsoft considers Volume Shadow Copies to be essential to the operation of Windows. More than a few of the internal services like System Restore and File Backup make extensive use of it. Support is even built-in to Windows Explorer (the file managing utility, not the internet browser). If you know the proper url, you can navigate to where the previous versions are stored on the hard drive and work with them like any other file.
But, bizarrely, Microsoft didn’t connect any of these technologies. They didn’t make it easy for the end-user to take advantage of their hard work. Sure, right clicking is easy enough … but … that’s the problem. It’s like saying that something is “good enough,” or “useful enough.” The “enough” is a qualifier, it implies that the solution is merely passable rather than excellent.
The problem with Microsoft’s implementation of Previous Versions is that you have to add the qualifier. Of course a good tool should be invisible, at least until you need it. But Microsoft’s Previous Versions is too invisible. It forgets that you should also be able to find said tool quickly and efficiently. To use Microsoft’s Previous Versions (assuming you even have the right version of Windows), you first have to load a context menu, then you have to go to the all-encompassing “Properties” option and find the right tab. Only after three unnecessary clicks can you actually review your shadow copies. And what happens if you don’t know where your lost file once lived? There’s no way to actually search through the archive.
You see, it’s “good enough.” And because there’s a gaping hole in the integration, others can make some money by patching it; enter Time Traveler. Bears on the Loose took the final step that Microsoft should have taken: they integrated Shadow Copies into the rest of the Windows.
The program does one thing, it points Windows explorer to the url where the relevant volume shadow copy lives. Simple, huh? Remember, Windows Explorer already has support for browsing the shadow copies built-in. It just needs a little help getting there. And this works on every version of Windows: Basic, Home, Home Premium, Business, Enterprise and Ultimate.
Time Traveler represents “Previous Versions” as it should be. Invisible until needed, then easy to access and use. It’s loaded by clicking on View –> Explorer Bar -> Time Traveler. Alternatively, you can hit Control + T to toggle the slider on and off.
When loaded, it subtly clues you into what previous versions are available via a convenient timeline. You can open that point in time by moving the slider bar. Hence the name, you “travel back in time.” Windows Explorer does the rest of the work.
But even if Time Traveler makes the navigation of shadow copies easier, that one simple action doesn’t justify the $20 that Bears on the Loose charges for it. I would say that it’s the program’s “other” feature that makes it valuable. Namely, it makes it really easy to configure and manage the Volume Shadow Copy Service.
While I am aware that managing the Volume Shadow Copy Service is possible with the Control Panel, I’m not exactly sure how it’s done. Frankly, I’m not even sure where to begin. I once found a few options when I was looking for something else, but I can’t remember where I saw them. Time Traveller, however, takes all of those available settings and puts them on the same configuration page. Want to change how often the computer takes snaphosts? You can do that. Want do change how much hard drive space is used to store them? You can do that too. Want to manually delete or protect old snapshots? The settings for that are also available.
Sure, Time Traveler isn’t what anyone would call groundbreaking software. But that doesn’t mean that it isn’t valuable. It transforms Volume Shadow Copies from a system tool into a user tool, primarily by linking Microsoft’s own technologies together in a more cohesive manner. I hope that someone at Microsoft takes a good look at how Time Traveler works. It represents “Previous Versions” done right.
Despite all of its strengths, Back In Time has one major weakness: it doesn’t support backup over a network. But luckily, it runs on Linux,the single most customizable operating system in the world! As a result even though Back In Time might not officially support a backup to a remote computer, you can still make it work through a little bit of spit and grit.
The magical sauce is the Fuse SSH file system. This kernel module allows for Linux to mount a remote share as a local drive. And by doing so, Back In Time thinks that it is working with a local folder even though the data might be sent across the network or internet. To make it work, though, you’ll have to work at the command line and do a bit of programming. But, don’t panic because it isn’t that hard. It amounts to a few shell commands and about six lines of code. Below, I’ll show you how in seven simple steps.
Linux is a bit of a funny creature. In many ways, it’s the most integrated and full featured operating system in existence. Take software development, for example. You couldn’t ask for a more integrated, well thought out solution. The tools are absolutely first rate, the system is stable, and because the platform is open source, most of the rough edges get worn off rather quickly.
But there’s also a downside to open source. You see, everyone tends to scratch their own itch first. Thus, while there are a bevy of tools that perfectly meet the needs of a few (most notably their authors), they often miss the needs of the many. That is a problem, because the masses don’t necessarily have the skill set required to adapt an already existing program so that it fits them. If anything, this is why Microsoft is valuable. They create software that more or less handles the needs of the masses.
And as might be expected, this is also the state of backup on Linux. It is no understatement to say that you can get your hands on the very best backup tools available, for free. All it requires is that you use some derivative of the following:
sudo apt-get install toolname
Unfortunately, while you can find the very best tools, that doesn’t necessarily mean that you will be able to use them. Rather that be written with the end-user in mind, they were created for programmers and system administrators. You know, the type of people who wonder why anyone would bother with a user interface. After all, it’s so much faster to do everything from the command line.
The result is that while the Linux backup tools may be powerful, they also have a learning curve steep enough to bang your head against. And that is an absolute shame. In general, I (and a great deal of humanity in general) am against activities that require me to learn new things or otherwise grow in what might end up being a painful direction. Even if it is for a good cause. (And I can think of few more important than making sure thatmy personal information is safe and secure.) Ideally, I want backup to be easy. I want to “Set it and forget it.” Time Machine for Mac OS X allows me to do this, as does the Windows Vista File Backup. But at first pass, such a solution for Linux is woefully absent.
That’s not to say that there aren’t contenders. In fact, a quick search on Google will reveal several: sbackup, Flyback, and TimeVault all look promising. But if you look at their project pages, you will notice something disconcerting: in each case, the programs are old and there isn’t much recent activity. This is typically a bad sign for an open source project. No activity usually means that the program is dead and unlikely to advance further. And that is really too bad, because sbackup, Flyback and TimeVault are good programs with potential. But, like many other open source options, they have a number of very rough edges.
Maybe that’s why I got so excited when I saw a new contender, called “Back In Time,” when it was recently featured on Lifehacker. At the time, I thought, “Have I finally found a backup program I can really use?” Now, after four months of using it full time, I can answer that question: Yes! Without a doubt!
Seven or eight years ago, I remember seeing a print advertisement for Apple’s latest computer: the MacBook. Like most Apple ads, it hyped the benefits of a connected digital lifestyle promising things like “Web design for the rest of us,” and “Access to the ‘Podcast Revolution.’” At the time, I remember thinking, “Why would I ever want to have a connected digital lifestyle? I like my anonymity. That just seems like a privacy violation ready to happen!”
And while I still hold many of those same opinions, I probably should mention that I have thoroughly changed my ideas on the necessity of the digital lifestyle. And, ironically, it wasn’t the promises of convenience, understanding or creativity which resulted in my change of heart. Not at all. Rather, I came to realize that I should embrace digital existence for one simple reason: necessity.
Archiving files is all well and good, but it is only one part of a complete backup plan. What should you do if your hard drive decides to fail? Or if your computer were to be stolen? How do you go about restoring your system right away so that you can actually get back to work? Disaster recovery is a slightly different challenge than file backup and it requires a different tool, the “system image.”
A system image is an exact copy of a drive. It includes all of the Windows files, system settings, programs and program files. And when you restore a computer from a system image, it’s a complete restoration. You usually don’t restore just a few specific files or items, that is what a file back-up is for. (In fact, most system backups don’t even provide the option to restore a single file.)
If you use Time Machine on the Mac, it makes both a backup of your files and a system image at the same time. Windows Vista, however, separates the two tasks. File backup (which we looked at in the previous article), runs separately from “Complete PC Backup,” which creates the system image. This is a disruption in the “set it and forget it” mentality that I am striving for. Worse, the built in Windows Vista tool will only work with an external hard drive and “exclusively” comes in the Windows Vista Business and Ultimate editions. (And while Windows 7 will let you create an image to a network location, it places other artificial limitations on the process.)
You might call me picky, but I know exactly what I want in an backup image: a solution that runs without me thinking about it, which can backup to a network attached storage (NAS) and takes differential snapshots of my system drive. (While using an external hard drive is an “acceptable” solution, it isn’t ideal. It injects an additional step and unnecessary complexity into the process.) Frankly, I want the built-in backup to work exactly the Windows Home Server does.
The astute reader might ask, why not just use Windows Home Server? It appears to work well. (In fact, some users think it is the best thing since sliced bread.) But from where I sit, I see a few downsides: 1) it costs money and 2) it requires me to buy new hardware. In comparison, a Linux based server can be installed on anything that I happen to have lying around, and makes it tremendously easy to to install other programs like Subversion which offer their own advantages.
But that leaves the question, “If the built-in Vista tools aren’t acceptable, what do you use for an image based backup tool?” Well … I’m glad that you asked.
As anyone who must perform routine (and extremely repetitive) tasks can tell you, they aren’t fun. In fact, unless pains are taken to ensure that they are easy and convenient, they might not get done at all. This list of unpleasant necesseties includes such joys as: balancing your checkbook, folding the laundry, and routine computer maintainence (including backing up your data).
Maybe this is why Time Machine (a backup program for Mac OS X) is the standard against which all other backup solutions are measured. Time Machine is an all in one solution: it quickly restores files or an entire disk, can backup to a network (with a little bit of help) or a local hard drive, and it runs either automatically or manually. In short, it makes backup simple and convenient. Truly a “set it and forget it” type of solution.
Amongst PC geeks, there is a great deal of Time Machine envy. (It really does make backup that easy.) Luckily, however, it is possible to create recreate (and in some ways even surpass) a Time Machine experience on Windows. This article will show you how. First, we’ll set up an unattended and automated backup system. Next, we’ll look at how to search and retrieve things from that backup, verifying that your important information is safe. Last, we’ll look at how you can find previous versions of your files when you don’t have access to your external backup cache.
Note: While the instructions here assume that you will be making your backup to a simple home server running Samba and Subversion, they will work with most network attached storage devices (NAS).
At it’s World Wide Developer’s conference in June of 2006, Apple released a product that changed the way that a great many people think about backup: Time Machine. While I cringe at the thought, I need to descend into the fawning adoration public relations speak that masquerades as critical coverage of Apple Products. (Actually, forget that, here’s how Apple describes their backup system.)
Time machine is a breakthrough automatic backup that’s built right into Mac OS X. It keeps an up-to-date copy of everything on your Mac – digital photos, music, movies, TV shows, and documents. Now, if you ever have the need, you can easily go back in time to recover anything … Time Machine takes care of it … Automatically, in the the background. You’ll never have to worry about backing up again.
General sarcasm and bitterness aside, Time Machine really is a spectacular piece of kit. Sure, you can very successfully imitate a Time Machine experience using the tools within Windows Vista or Linux (or via third party tools such as Norton Ghost). Even so, Time Machine is just just about the perfect combination of simple, powerful, and integrated. And like most Apple products, when used within the Apple eco-system is a lovely experience.
However, if you migrate too far out of the walled garden, Time Machine isn’t quite so nice to work with. Actually, it can be a bit demanding and temperamental. For example, it requires its own formatted hard drive or the ready availability of a specialized Apple router (called a TimeCapsule). Alternatively, it can be a bit flaky; when I was backing up to a local hard drive, it would often quit with an indecipherable error. Luckily, however, these limitations are pretty easy to overcome. In this article, I will look briefly at how to setup Time Machine so that it works with a simple home server running Samba and Subversion.
Writing anything - whether it be a book, or a short story or an angry letter to your boss - is substantially more than starting from the first idea moment of inspiration and continuing to the final draft. Rather, writing involves a fair number of idea fragments, fleeting moments of inspiration, and a tremendous number of dead ends.
It is incredibly unfortunate that most writing software, however, is geared to organizing and structuring the document after most of the hard work has already happened. It simply assumed that most of the planning and layout has already happened and the author is ready to string words together. Unfortunately, this assumption overlooks one important truth: ideas are best defined as they are expressed. Thus, it's usually about the time that the a writer sits down to compose the draft, that the document's true structure becomes apparent. In my own case, this often leads to a flurry of reorganization. And it’s during the restructuring that the real battle begins.
When in full creative passion, I am typically working with three or four different programs all at the same time: OneNote is open so that I can access my ideas, Word is there to start collecting the somewhat finished text, and I'll also probably be using a MindMapper so that I can see a visual representation of the document structure. The tools are separate and don't communicate with one another. Thus, a change made in one place needs to be made everywhere. And all too often, that I end up fighting the word-processor and the notetaker, and the mind mapper. It is tremendously frustrating to battle the tools of your adopted trade. Luckily, I am not alone in my frustration.
In the past everal years, a number of programs have become available that leave the linear model of writing behind. On the Mac platform, one such tool looms above the others: Scrivener. Central to Scrivener's function are two important metaphors: that of the outline and that of the corkboard. And it works really, really well. There are just a few minor problems. First: Scrivener is only available for Mac and Scrivener's lead developer has made it clear that there won't be versions for other platforms. Second: Scrivener was really designed with creative writing in mind. Thus, while it can be used for long and complicated documents, this is a slightly less than straightforward process. Last, to create said fancy documents, Scrivener requires the raw use of a markup language (and all of the associated headaches that come with it).
The document processor, LyX, however, excels in many areas where Scrivener falls short. It is built upon the mature and robust underpinnings of LaTeX, the typesetting language of choice in the science and engineering. And more importantly, it is easy to use (where LaTeX most decidedly is not). But it fails in the same way as Microsoft Word and other word processors, it is a linear writing tool and doesn’t offer a great deal of work-flow flexibility. That is where LyX-Outline comes in.
LyX-Outline is a marriage between Scrivener's organizational tools and LyX's typesetting tools.