Tuesday, July 8, 2014

Common Sense Backups

What about backups? Glitches happen. A dust widget has fallen into the disk drive; your fingers got mixed up, hit the option key twice; this app has taken on a mind of it's own; it has taken over the whole desktop; nothing works any more; shut the computer down and you lose an hour of changes because you haven’t saved since way back when. Modern programming is to me wonderful, but still the unpleasant fact is that bad things can happen, big chunks of data lost in cyberspace, where only a highly paid expert who sees you coming can find it. Apps, even the ones you pay for, may not have been adequately tested, may not have been tested at all.

I do backups every night. I also do weekly backups, and sometimes a monthly. And last but not least, I am not so lazy that I can't put my finger on the save button every little while. The app I use most frequently, Emacs, auto-saves every five minutes. Emacs has never let me down.

I don't like carrying snap drives around, though for a long time I carried around a 16G SD card in my wallet. In this digital age people naturally have on their computer precious files. It can be 2 or 3G of family pictures, the babies growing up. It can be a precious journal, or a novel once written and fondly remembered. An accident, a careless deletion, and these files may be lost forever. I have always been astonished how quickly major deletions happen. There is no time for a second shot. You press the button and it is gone. A fire, a big storm can make you naked fast. For once the word devastating truly applies.

Many millions of people carry around their backups on snap drives. They put these drives and disks in wallet or pocket book or on key chain because they don't know what else to do with them. Of course they understand that these cherished drives are as apt to get stolen as the house the machine is in is apt to burn down. On the other hand, if the house is burned down, the drives are safe in your pocket in Walmart, where you are shopping; and if somebody steals your pocket book, the drives in your machine are safe at home. To both lose drives and machines at the same time is hard to imagine; and frankly in my opinion not worth thinking about. If you are that unlucky, be happy you are still alive. But that is not the only snafu.

I am a writer, for what it is worth. It's a habit, and for about the last ten years almost all of my writing has been done on a computer. Recently I lost a disk drive. I had a plan in place and everything worked, but it took me a week or so to get back up to speed. I got the stuff I was working on going again pretty fast, but to return configuration files and settings exactly how I wanted took awhile.

I love to write on my computer. Since I have been retired, I do not much else. Actually, modern computers are not built for writing with. There are hardly any good programs or apps for writing. A lot of people will consider that statement to be rather dumb. But that is because they may write an occasional email or a report for school. If you sit down in front of your machine with the notion that you'll write a six-hundred page novel, or four or five of them, you will soon know what I mean. I have tried every app I know about. Most are painfully slow and difficult to use. There are writing systems involving multiple apps. They are useful if you think a lot about writing but never quite get there. Distractions are deadly. The screen gets overloaded with multicolor charts, outlines, time lines, plans, notes, and the first word is yet to be written. However, there are a few apps that work okay, that encourage you to get started now and not confuse yourself too much. One good one, if you are in ⋆NIX, is Pyroom. It is blazing fast, won't waste a second of your time; another, if you happen to be on the Mac is good old Bean. These two, I can tell you, if you have a big project in mind and want to get through it will always be there to focus your concentration.1 But though they work okay they won't support much else besides an rtf or a txt file. If you are lucky enough to have a publisher or an editor, they probably will want a txt file anyway. But most serious writers blog or they self-publish. I love the idea of self-publishing. I don't want an agent or an editor. I love the whole process from the creative writing to the published book. I love to write raw LaTeX or raw HTML, dabble in CSS, and so my writing app of choice is Emacs. When I am writing on the Mac, I like to use Aquamacs, and when I am writing on BSD I use Emacs. Whichever I use, I think about backups all the time.

Now in my case, the disk drive did not suddenly cease functioning. It proceeded along slowly toward a condition that ended up being non-functional. The drive was not even a year old. I thought my FreeBSD system was the culprit for several days. In ⋆NIX X-windows is always playing tricks. It is always the shakiest part of the system simply because it plays the largest part. I convinced myself that what was giving me trouble was X-windows. Besides, I've never had a disk drive go on me in 10 years. Anyway, I got to a point where I couldn't startx anymore. UNIX is wonderfully clever about allowing you to get back into the system in single user mode. The system lets you boot up to a root terminal, and mount whatever directories need to be rescued. It was either the disk or the system that was broken. I had just done a backup of my home directory, so all I needed to do then is mount one folder and get out a couple hours work, and I would be in the clear. If you do backups of your home directory, date them and hang on to three or four of them just in case. Of course, you must know that these backups will be useless if you don't load them on a separate media, a snap drive or SD card or external disk or something. If disk or system is dropping off to digital mystery land, obviously then is not the time to back up. Get out, boot into rescue mode, save the files you need to or can, and hope that they have not caught the general malaise.

I still did not know what was going on for sure. With everything off my system, I started an upgrade. But the upgrade acted funny immediately. Then I loaded a brand new fresh squeaky clean system. Still nothing worked. When I installed one of my spare hard drives, that solved the problem. I should have known, of course, but for me it was a first.

The point I want to make is that there is no ultimate solution; the only other solution is to backup the backup, and that is not the ultimate solution. Even a RAID system if your OS is smoldering, something surprising is going on during an upgrade or update, for example, is not going to help you out. If your OS is smoldering, has caught a bug, for instance, and you are running a RAID, both drives, if it is a RAID 1, which is most common, will be smoldering. Then all your planning will just reward you with two screwed up drives instead of one. This is true with hourly updates to the backups. If you are in a system that is having problems, and you forget to turn off the automatic updates, you are updating your problems.2

Fortunately, there are as many ways to back up as there are ways to avoid backing up. The common user who does not back up at all may not be dumb. If there is nothing to back up, and everything can be easily replaced by another download from the net, why bother? One recommended way of doing an upgrade, for instance, is to back up the home folder, and then ditch the system and reinstall. Why worry about losing stuff you can easily replace? The general rule is to focus on stuff you can't replace. Everybody knows what is precious and what is not. Simple backups of files and folders to a snap drive may be the answer. One very intelligent woman I know, who has many precious files to watch over, wraps her drives in a colorful handkerchief and they go with her in her pocketbook. She insists on the above, that either the computers will be safe or the snap drives. It's her way of doing it and for the great multitude of computer users, this may be the answer. You need not go to any further expense. How long does it take to throw a file into a snap drive? Seconds, maybe. I put my main replacement drive, which I back up to once a month, in a fire safe. This drive, incidentally, is bootable but bootable only on another Mac, a fact I don't like, but I am stuck on Apple and though I tell myself how crazy I must be, there you are.

About snap drives and SD cards. When I finally bought a 125M snap drive a long time ago, that, I felt, was a game changer in computing. Even fussy old folks who had cherished photos and manuscripts locked away in safes had a strange feeling that these new memory devices might work. And maybe they could go out and buy a computer and learn a little bit and sure enough, they wouldn't lose anything. Before that I had backed up lots of things on floppy drives. But honestly, 1.4 megabytes? How should I be impressed? You could really put some serious stuff on a snap drive and not see that dreaded "no more space available" message. And no moving parts! I fell for the hype, but since then nobody has been able to convince me that snap drives are failsafe. What are you going to do when you plug it in and nothing happens? On the other hand that floppy I have in my hand which I just took out of the same metal case I used for my note cards in high school? Either the data is on the damned thing or it isn't. And besides that I have about ten usable floppy drives to plug in; and five more usable CD RW's; all collected at the dump. And they are free however you want to think about it. I have been looking with fascination at tape drives too. There is a ton of info in UNIX docs about how to do a "dump" to a tape drive. Again, the same case: it's either on the tape or it ain't. Eventually I'll find an LTO somebody has junked. CDs can be organized into loose-leaf books with notes and all kinds of other rif-raf. Besides the digital journals on my computer, my collection of CDs from my old OS hopping days when I went exploring with the DV7 has copious written notes. There are lots of ways to go, and I guess it comes down to what is most convenient for you.

Now, suppose you hang in there, become an ancient, it's now twenty years down the line. Rather than become less precious, those files have become more precious. That picture of your daughter graduating from High School valedictorian makes your eyes foggy with delight. By now those journals are your flesh. Lose a word and that is your flesh flushing down the toilet. Praise to tell another Steve Jobs has come along who has put his manicured finger on a super drive connector that is like a USB but on the other hand not like a USB. You know all those memory devices that you have collected? They don't work any more. I know it won't be exactly like that in the real world. (I wonder how close? I hope not too close.) Suppose also those digital wonders degrade with time, and your beautiful photos have lost every other byte so you can't see them any more. Video is the worst, harder to save and back up in such a way that you can expect it to last. What's your plan for that?

Apps change. Who knows if in ten years a .txt file will work on your computer? If you are as compulsively against typos as a conscientious farmer is in rooting out weeds, do you really want to know that a bad crash can rip big holes in your files? Or that there is such a thing as byte rot? I personally will continue to do my backups. The Selectric is in a corner of the hay barn where I put it a long time ago. That's where it will stay. But a wise person might certainly think twice. Good luck. I still have manuscripts from 40 years ago. If they had been digital files?


1. To give due props, there is an app called Jer's Novel Writer. It is the world's best dang word processor. Last I heard it is no longer maintained. The author of it got a job with Apple. I'll try to do justice to it one day.

2. This is of course way over simplified. We are just little people trying to hang on to our precious files. I wouldn't be writing this if I did not think it could be done.