Location : Web Hosting - Web Hosting Knowledge Base - phpBB Tutorial

restore and backup phpBB database Tutorial

There are two ways to perform a database backup of your phpBB forum, one option is through the Backup Database option under General Admin section in the phpbb forum administrator screen, the other option is through entering mysqldump command through the hosting account shell command.

If your phpbb database is small (i.e. few MB to 100MB), you can use the database backup option in phpbb forum administrator screen to perform a backup of your database, if your phpbb forum database is big, it is recommended to use the shell command to backup your database instead. This is basically to avoid memory problem that might happen when you are receiving the huge text file.

Below explain the two option mentioned for backing up database :-

Using restore and backup option in forum administrator screen

To Backup database

  1. Login to phpbb forum administrator screen
  2. click on the Backup Database option in General Admin section of the left navigation panel
  3. Select Full Backup
  4. Select Yes for Gzip compress file
  5. click Start Backup
  6. Wait for some time for the system to generate the mysql database backup, there will be a pop-up window showing up after the process completes, there will be a file generated after the process and it is actually a text file containing your phpbb database structure and data in compressed form
  7. Save the generated file to your PC

To restore database

  1. In the forum administrator screen
  2. click Restore Database option in General Admin section in left panel
  3. in the restore database screen, click browse and select the mysql backup file in your PC
  4. click Start Restore and wait for the status screen

Using mysql command in Linux shell prompt

Backing up database

  1. SSH login to your hosting account
  2. at the linux shell prompt, enter the following command :-
    mysqldump --database mysql_dbname > dumpfile.sql
  3. use an FTP client to download the dumpfile.sql to your PC

Restoring database

  1. FTP upload your mysql file to your hosting account
  2. SSH login to your hosting account
  3. enter the following command in the shell prompt:-
    mysql -umysql_user -pmysql_user_password -Dmysql_dbname < dumpfile.sql

Also check out a more complete mysql database backup restore process documentation.