- Compatible XF 1.x versions
- 1.0
- 1.1
- 1.2
- Additional requirements
- pigz or pbzip2 installed (if you want to use the faster, multi-core compression methods)
An Amazon S3 account (and s3put installed) if you want to sync your SQL backups with AWS
XenForo backup script
Made because I hate doing this manually!
You will need
As this resource is a GitHub repository, updates will be posted there. I will try to update this resource every time I revise the backup script, but it's relatively mature (I've been using it for a while now) so shouldn't need too much maintenance.
I'll try to answer any questions you may have, but as I work on this in my (limited) spare time, please allow some time for a response.
Made because I hate doing this manually!
You will need
- SSH access
- pigz or pbzip2 installed (if you want to use the faster, multi-core compression methods)
- An Amazon S3 account (and s3put installed) if you want to sync your SQL backups with AWS
- A little experience with the Linux shell environment
- Download backup_script.sh from the repo
- Save the backup script somewhere you'll remember. For example /home/backups
- Make it executable with chmod +x backup_script.sh
- Fill out the config variables (see below)
- Add a crontab entry to run every night at a time when your site is likely to be less busy. Something like this will do:
Code:
0 3 * * * /home/backups/backup_script.sh
- db_username - The username for your SQL database
- db_password - The passsword for your SQL database
- db_name - The name of your database
- compression_method - The compression executable that will be run. Choose between pigz, pbzip2 orgzip
- backup_path - The location you want your backup files saved
- web_dir - The location of your xenForo installation
- bucket_name (optional) - The Amazon S3 bucket name and directory in which to sync the SQL backups
As this resource is a GitHub repository, updates will be posted there. I will try to update this resource every time I revise the backup script, but it's relatively mature (I've been using it for a while now) so shouldn't need too much maintenance.
I'll try to answer any questions you may have, but as I work on this in my (limited) spare time, please allow some time for a response.