Database backup and restore



phpBB uses a database to store all the data used on the board, including users, posts, topics etc. Backing up the database can be useful as a protective measure in case of any accidents which could cause data loss or damage to the database. If any accident like this would occur, you would have a possibility to restore the database to a previous state from the backup. You can use the backup tool to move your board to another host - you will make a backup on your current server and restore it on the new one to keep all data.

Database backup

  • Backup type: You can backup the whole database or you can either backup the structure or data. The structure only contains the hierarchy in which the data is stored, on the other side, if you only backup the data, you will need a pre-prepared structure when restoring/importing data.

  • File type: Depending on your server setup, you can save the backup in several formats. The Text option saves the backup in plain text, other options compress the file to decrease the filesize of the dump.

  • Table select: You can either Select all tables or you can select individual tables to backup. When backing up a large database, you can exclude the search tables (do not forget to restore their structure) and recreate the search index on the new server.

    Tip

    Use the CTRL and Shift keys together with your mouse to select individual tables.

Database restore

  • File select: You will be offered a list of database backups which are saved in the store folder. Select the one you want to restore and click Start restore. The restoration might take some time and it will overwrite any existing data on the board.

Figure 3.10. List of backups available

List of backups available

In this list, located on the Restore page, you can find a list of backups made through the phpBB ACP which can be selected and restored.

Note

The ability to download backups from the ACP was removed in 3.2.6. Backups will need to be downloaded from the server using FTP, SCP, or another mechanism.