Backup Your Forum!

Welcome to Another Admin Forum!

Welcome to Another Admin Forum! Join our community of forum creators today. Register for a free account and get tips, resources, and support to build and grow your forum. Let's create better forums together!

Shawn Gossman

Administrator
AAF Administrator
AAF Moderator
Joined
Sep 7, 2023
Messages
4,972
Reaction score
496
How often do you backup your forum?

How do you backup your forum? Do you do it manually, rely on your hosting service, or both?

How and where do you store backups?

Have you ever had to use a backup?
 
I have done it manually, and it's due already. I have to set this in auto mode.
I like to have an offline copy.
No, I haven't had to use a back up before.
 
How often: Daily
How: have a script that runs via a CRON job
How/Where: 7 day rolling full backup stored on the server, on 2 separate VPS's (rsync) at opposite sides of the US, on my home desktop and on my home NAS.
Have ever used: Yes, when moving to a new VPS instance I will run my backup routine for that day and then use that archive to move over to the new VPS. As for needing it for recover, only twice when doing a XenForo upgrade.

For those that run a VPS and would like a script to use it via a CRON job (it does depend on the VPS/server having ZIP installed). It also assumes you are using UTF8MB4 character set, which both Invision and XenForo require and Wordpress can use. I am not sure about other scripts. This has been working for me for the last several years.
Bash:
#!/bin/bash
####################################
#
# Backup to local directory 7 day rolling.
#
####################################
mysqldump_location="/path/to/your/website/root/directory"
/usr/bin/mysqldump --opt YOURDBNAME --single-transaction --default-character-set=utf8mb4 > $mysqldump_location/yourSQLdumpfile.SQL
# What to backup.
backup_files="/path/to/your/website/root/directory"
# Where to backup to.
dest="/path/to/store/locally"
# Create archive filename.
day=$(date +%A)
hostname=$(hostname -s)
archive_file="yourdomain.ext-$day.zip"
# Backup the files using ZIP.
zip -r $dest/$archive_file $backup_files
rm -f $mysqldump_location/yourSQLdumpfile.SQL
 
Last edited:
How often: Daily
How: have a script that runs via a CRON job
How/Where: 7 day rolling full backup stored on the server, on 2 separate VPS's (rsync) at opposite sides of the US, on my home desktop and on my home NAS.
Have ever used: Yes, when moving to a new VPS instance I will run my backup routine for that day and then use that archive to move over to the new VPS. As for needing it for recover, only twice when doing a XenForo upgrade.

For those that run a VPS and would like a script to use it via a CRON job (it does depend on the VPS/server having ZIP installed). It also assumes you are using UTF8MB4 character set, which both Invision and XenForo require and Wordpress can use. I am not sure about other scripts. This has been working for me for the last several years.
Bash:
#!/bin/bash
####################################
#
# Backup to local directory 7 day rolling.
#
####################################
mysqldump_location="/path/to/your/website/root/directory"
/usr/bin/mysqldump --opt YOURDBNAME --single-transaction --default-character-set=utf8mb4 > $mysqldump_location/yourSQLdumpfile.SQL
# What to backup.
backup_files="/path/to/your/website/root/directory"
# Where to backup to.
dest="/path/to/store/locally"
# Create archive filename.
day=$(date +%A)
hostname=$(hostname -s)
archive_file="yourdomain.ext-$day.zip"
# Backup the files using ZIP.
zip -r $dest/$archive_file $backup_files
rm -f $mysqldump_location/yourSQLdumpfile.SQL
Nice resource here :)
 
I take daily backups and also use JetBackup, which stores data off-site on another server provided by my hosting provider.


I regularly check my backups on JetBackup as well to ensure they’re working properly.
 
I should note... that script only really works if your data (including your images) are stored locally. If they are stored on an S3/R2 type instance, then you will have to add to it. I don't mess with that yet, as I have plenty of space. But that may change also. Depends on how the KimSufi E3 server (Intel Xeon E3-1245v2 - 4c/8t - 3.4 GHz/3.8 GHz) I just got for $15 (2x480SSD and 32GB RAM) does. Base specs are higher than the VPS I have from Hetzner, but I have to see how the performance is. The network pipe is also only 300/mbps unmetered, for for smaller sites should be fine.
If nothing else, I can use it for additional off-site storage.
 
As for "have you ever used it"... just did tonight when I moved my site from a Hetzner VPS instance over to an OVH dedicated server.
 
I always used to forget to backup my forum and it used to annoy me a lot as I could at any point have an issue with my forum and then I wouldn't have a recent backup.

I aim for once a week at least now to be sure I have one.
 
I think once a week is a good goal!
 
Back
Top Bottom