Categories
Admin Computers

Improved Website Backup

I’d previously written about backing up this site using a couple of bash scripts, ssh and rsync. It’s actually been working just fine. But, being me, I couldn’t leave well enough alone.

You see, I’m looking at these bzipped tar files that are in the 130MB range accumulating in my home directory and I start thinking that it’s an awful lot of space I’m just taking up. Initially, I figure I’ll just prune the directory every week or so because, really, now that I’m satisfied with the look, the site really won’t change much other than additional content. So as long as I’ve got a week’s worth or data, possibly creating a monthly snapshot as well or something, my backup needs should be more or less fulfilled.

That’s when I realize that I really don’t need to backup the site every day per say, just the content. And that’s all in the database dump. So I realize, on a daily basis, all I need is to update the database backup portion because the site portion of the backup is really fairly static. From a content perspective, the main change would be due to uploading pictures for posts.

These are the sorts of things that happen to programmers. We get an itch and we just can’t not scratch it.

Categories
Admin Computers

Website Backup Over SSH

I recently enabled ssh shell access to my Hostmonster hosted website account. Previously, I’d relied on cPanel for all my maintenance. With shell access comes all the power of shell commands and scripting to your fingertips. I’ve come up with a nice, for me, automated backup process for the site which I present after the jump. But be gentle, my bash scripting foo is weak.