Duplicate Backups From Within XF

CrazyChef

Active member
I find it very odd that XF doesn't have an internal backup feature. Or am I missing something? Preferably to an external source, such as Backblaze.
 
Upvote 2
This suggestion has been closed. Votes are no longer accepted.
In my opinion, having a backup setting would be outside of the scope of XenForo, and more within the scope of the system administrator.

It's easy to set up a backup. If you are using managed hosting, they probably offer a backup service as an a-la-carte extra.

I use a VPS, with Linode, and for $5.00 a month I get a daily backup of my entire VPS, automatically, at the time block I specify (I do it about 4 AM). This service also includes a "snapshot" backup, which allows me to initiate and maintain a backup at any point in time I choose, in addition to the automatic daily backups. A snapshot is helpful, for example, to do right after you take the forum off-line if you are doing a major operating system upgrade (for example, if you are migrating from Ubuntu 18.04 to 20.04), or say a XF 2.1 to 2.2 migration. That way you have something current in case you need it to restore, after a botched attempt.
Screen Shot 2020-07-30 at 10.09.32 AM.jpg

In addition, I also use a (1 AM) Linux cron job on my VPS to do a daily backup of my forum's MySQL database, via mysqldump. Once a week I download one of these backups to my own computer via FTP, where it is backed up locally via Time Machine, and to the cloud via Backblaze.

mysqldump --opt --default-character-set=utf8mb4 -u'USERNAME' -p'PASSWORD' xenforo | gzip -c > /var/www/html/MYFORUMDOMAIN.COM/mysql_backups/xenforo-backup-$(date +%F).sql.gz

Lastly, I also do a weekly incremental backup via ssh of my forum's attachments to my computer's hard drive, via the Linux rsync command. This takes just a couple of minutes, and is then backed up via Backblaze to the cloud. This is also a good idea to have, in case you ever lose your forum's "internal_data" folder or its contents. You can also do this with the XenForo "data" folder, though I do not do this.

rsync -av --delete --rsh=ssh 'USERNAME@MYFORUMDOMAIN.COM:/var/www/html/MYFORUMDOMAIN.COM/public_html/forums/internal_data/attachments' /Volumes/Moe/internal_data
 
Last edited:
Back
Top Bottom