phpBB Backup suite 1.3.2

This backup suite is part of 
www.in-my-opinion.org/in-my-opinion-3734.html
"How to secure your forum against hackers"

Get support and the newest version at
www.in-my-opinion.org/in-my-opinion-4529.html

 

Short note

I can not guarantee that these scripts work, since they execute some server commands. However, I tried them on 4 different servers (= 4 different providers) and they worked.

The backup of the database works only with MySQL (= the most cases).

 

How to install

  1. Create a folder named something like "backup/" or "phpbbbackup/" within your phpBB folder
  2. Copy all files there
  3. Call "backup/index.php".
    If you get a complaint about wrong attributes then change the attributes of your folder "backup/" to 775 or 777.
    The needed attributes differ from server to server.

 

Password-protect your backup folder

  • Click on "Protect this folder by a password" to password-protect your "backup/" folder.
    • You will be asked for a username and password and an ".htaccess" and an ".htpasswd" file will be created automatically.
    • This password protection is HIGHLY recommended. Why? Because if someone has access to your backup folder, he can download your backups which include important (and confidential) information.
  • Note: "htaccess-protectthisfolder.php" is actually a standalone script that I wrote. It can protect any folder you like, not only your "backup/" folder.

 

------------------------------------------------------------------------------------------------------
<-------- You don't need to read any further, except for expert tweaking -------->
------------------------------------------------------------------------------------------------------

 

Optional Configuration

  • Optional: If you want to backup/exclude special folders: Open "backup/what-to-backup/all.php" and edit it.
  • Optional: If you want to run other backups (i.e. bakupping special folders) you may create as many .php files as you like within "backup/what-to-backup/".
  • Optional: The same applies to adding other MySQL databases. Simply add more .php files to "backup/what-sql-to-backup/".
  • Optional: If you have MySQL binlogs enabled (which is actually somewhat unlikely): Read & edit is "bumyslqbinlog-values.php" since it contains server specific information for backupping them.
  • Optional: If you don't need File/Folder Backup, you may delete "bufiles.php". The same applies to "busql.php" (MySQL Backup) or "bumysqlbinlog.php" (Binlog Backup).

 

bufiles.php

  • bufiles.php backups (= copy & zip) all folders and subfolders.
  • If you call it as bufiles.php?suppressoutput=1 then all output will be suppressed. This is good if you want to run it in the background (e.g. as a cron job).
  • You can specify what it should backup by editing "backup/whattobackup/all.php"
  • If you want to have several backups (e.g. one backups everything, the other backups only *.jpg) then create another file just like "all.php" and name it, say, "onlyjpg.php", and edit its content. Then you can call bufiles.php?whattobackup=onlyjpg.php

busql.php

  • busql.php dumps (= copy & zip) your whole database
  • If you call it as busql.php?suppressoutput=1 then all output will be suppressed. This is good if you want to run it in the background.

bumysqlbinlog.php

  • bumysqlbinlog.php dumps (copy & zip) all MySQL commands, that have been used to alter something in your database.
  • This script will most likely only work, if you don't run an own server. Read "bumyslqbinlog-values.php" for more information.
  • If you call it as bumysqlbinlog.php?suppressoutput=1 then all output will be suppressed. This is good if you want to run it in the background.
  • You can call it as bumysqlbinlog.php?daysago=3 to backup the write-commands of only the last 3 days (works only with MySQL > 4.1.4)

 

You should setup cron, so that backups are done automatically.