Simple Backup

2 minute read Published:

I finished putting together my personal website backup script, and it can be found on my Github page.

Simple Backup is a bash script that will backup a single file system directory and a mysql database. It is intended to be used for personal web sites, hosting smaller amounts of data. You can run the script out of cron on the server that hosts your website, and it is recommended that you also run a sync process on your personal computer to ensure you have a copy of your backup files that is not on the server.

The default options will remove backup files after they are 30 days
old. File system backups are done via tar, with a full backup once a
week and incremental backups for all other days. The database backup
dumps all tables the configured account has access to. You should set
up a read only mysql user just for backups.

This script is a result of my personal desire to back up my blog, and
it is based on my post about [backing up your personal website](
I didn't see much else out there, so hopefully this is useful for others
as well. I'm happy to fix any bugs that may be encountered, but I can't
guarantee any kind of timeline. I accept absolutely no responsibility
for the integrity of backups created with this script, and I highly
recommend doing a test recovery if you choose to use it.

I would be happy to hear feedback from anyone who decides to give it a try.