Last night the hardware hosting my virtual server failed causing a crash. Thankfully, I backed everything up so it was just a matter of reinstalling the operating system and restoring the data. However, when I made the backups, I didn’t do it very effectively or efficiently so I made a lot of extra work for myself.
I learned a better technique for backing up. Rather than using the dump and restore utilities, I decided to just use the tar command. So first I backed up everything from my server in the cloud using tar over SSH to my desktop. From there, I did a restore from the tar archive to a test server that I spun up for just this occasion. Lo and behold it worked perfectly!
I also generated a list of all of the software packages that I manually installed and included them in the backup. Now instead of painstakingly going back and trying to make certain I’ve added the correct packages, I can issue one command and the chore will be done. So now the time to restore a crashed server is about 20-25 minutes. That’s not too shabby!