I got a frantic email from a friend this week. One of his subcontractors went crazy and trashed several of my friend’s clients’ web sites as well as my friend’s own business site. The police have been involved but much damage has already been done. I wish I had been hosting my friend’s sites. Had I been, I could have recovered everything from backups. As it is, all I could do was sit by and fume, wishing that his hosting company had had something to offer him in the way of assistance.
I know my friend’s pain. In the 30 years that I have been doing system administration, there have been numerous times when my own bacon has been saved by backups. I have been struck by the dread BUOD error (Bad User On Device) in which a glitch sitting between the chair and the keyboard has made the computer do all kinds of hideous deeds. The worst, early in my career, idled a team of a dozen programmers for three days. Why three full days? You guessed it: no backups. At the other end of the spectrum, a member of my team recently trashed a critical configuration file on one of our servers. This, however, resulted in no downtime; we simply grabbed a copy from the backups and continued on our merry ways.
If you accidentally delete a file from your web site (or, in my friend’s case, all of the files), can you recover it? Does your hosting company provide backups and, if so, can you recover files from their backup? In many cases, hosting companies’ backups are only for their use in cases of disk drive failure.
My company offers one (excellent, in my opinion) solution, Nest Egg Backup for Web Servers. There are many other alternatives. Do choose and implement one. When you go comparison shopping, ask the key question: How long are the backups retained? If only for one night, that means that your window of opportunity is extremely limited. If you delete a file at 10:00pm and wait until 8:00am to try to get it back, you are out of luck. You should have at least three days of retention, preferably more, preferably a lot more. Thirty days can give you a nice warm, fuzzy feeling of safety and security.
Lesson of the day: Back up your hosting accounts! And be sure to include everything (email folders, MySQL databases, PHP config files, etc. etc. etc.) The day disaster strikes is a day too late to start backing stuff up.