I think we all know the importance of keeping backups, but it’s also very easy to forget! It’s pretty funny how such an important task can so easily be forgotten about. Luckily for us, there’s a phpBB modification that can automate the task and make backups by itself. Here’s how to automatically backup your phpBB forum:
Note: This tutorial is working for version 3.0.11. Make sure to make a backup of your forum before installing any new modifications.
Step 1) Download “Auto Backup” for phpBB.
Step 2) Extract “Auto Backup.”
Step 3) Open (or install) Filezilla and connect to your forum.
Host = Your forum URL.
Username = Your control panel username (usually).
Password = Your control panel password (usually).
Step 4) Open extracted “Auto Backup” folder then open the “root” folder inside.
Step 4b) Drag & Drop the contents inside of the “root” folder into the main directory of your phpBB forum.
Step 5) Open cron.php and find:
// Unloading cache and closing db after having done the dirty work.
Then add this before:
if ((time() - $config['auto_backup_gc'] * 86400) <= $config['auto_backup_last_gc'])
include($phpbb_root_path . 'includes/auto_backup.' . $phpEx);
Step 6) Open includes/functions.php and find:
$cron_type = 'tidy_sessions';
Then add this after:
else if (isset($config['auto_backup_enable']) && $config['auto_backup_enable'] && (($time_now - $config['auto_backup_gc'] * 86400) > $config['auto_backup_last_gc']))
$cron_type = 'auto_backup';
Step 7) Go to yourdomain.tld/install_auto_backup.php and you should see:
You will then see this:
You should then see:
Step 8) Purge Cache and delete install_auto_backup.php
Step 9) Edit Settings and Enable “Auto Backup” by going to ACP > Maintenance -> Auto Backup
For Weekly Backups your settings will look similar to this:
Step 10) Enjoy your automatic backups!
Yay, now your phpBB forum will be backed up automatically for you. Even though your forum will be automatically backed up, you still need to make sure to download the backups to your computer. The backups will be of no use if they are on your server when/if it gets compromised. Anyway, I hope you enjoyed this small tutorial!