User Tools

Site Tools


org:forum_-_backup

FlatPress Forum: Backup

This guide explains how to put the FlatPress community forum into maintenance mode and create a complete backup with phpMyAdmin.

A complete backup always consists of two parts:

  • a complete SQL dump of the forum database;
  • a complete copy of the phpBB installation files.

A database dump alone does not contain uploaded attachments, avatars, styles, extensions, or the phpBB configuration file.

1. Preparation

Before starting:

  • Ensure that you have administrator access to the phpBB Administration Control Panel (ACP).
  • Ensure that you can access phpMyAdmin and the correct database.
  • Ensure that you can download the forum files by SFTP, SSH, FTP, or the hosting provider's file manager.
  • Check that sufficient local storage is available.
  • Do not update phpBB, extensions, or styles during the backup.
  • Record the phpBB version, PHP version, database server version, and backup date.

Recommended backup name:

flatpress-forum-backup_2026-06-28

2. Put phpBB into maintenance mode

phpBB calls this function Disable board.

2.1 Open the Administration Control Panel

  • Log in to the forum with an administrator account.
  • Open the Administration Control Panel.
  • Re-enter your password if phpBB requests ACP authentication.

2.2 Disable the board

Open:

General
  -> Board configuration
    -> Board settings

Set:

Disable board: Yes

Enter a maintenance message, for example:

The FlatPress forum is currently being backed up and will be available again shortly.
Thank you for your patience.

Click Submit.

2.3 Verify maintenance mode

  • Keep the ACP session open.
  • Open the forum in a private/incognito browser window.
  • Confirm that a normal visitor sees the maintenance message.
  • Do not create posts, edit users, change permissions, install extensions, or alter settings during the backup.

Administrators may still have access, depending on their permissions. Avoid making any changes until the backup is complete.

3. Create a complete database backup with phpMyAdmin

3.1 Select the correct database

  • Log in to phpMyAdmin.
  • Click the forum database itself in the left navigation tree.
  • Do not remain on server level.

The breadcrumb should look similar to:

Server: sql4 -> Database: usr_****_***_*

The real database name may be different.

3.2 Open the export page

  • Click Export.
  • Select Custom - display all possible options.
  • Select SQL as the format.

3.3 Select all tables

  • Click Select all in the table list.
  • Verify that every phpBB table is selected.
  • Include tables created by extensions.
  • Do not assume that the prefix is always phpbb_; the active prefix is defined in config.php.

For a complete backup, export:

Structure and data

3.4 Output settings

Setting Recommended value
Save output to a file Enabled
File character set UTF-8
Compression GZip
Export tables as separate files Disabled
Skip tables larger than Leave empty

Recommended filename:

flatpress-forum-db_2026-06-28

phpMyAdmin normally creates a file similar to:

flatpress-forum-db_2026-06-28.sql.gz

3.5 SQL format-specific options

Setting Recommended value
Display comments Enabled
Enclose export in a transaction Enabled
Disable foreign key checks Enabled
Compatibility mode NONE
Export view as table Disabled
Export metadata Optional

Maintenance mode is still important because not every possible table engine is necessarily transactional.

3.6 Object creation options

Setting Recommended value
Add CREATE DATABASE / USE statement Disabled
Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER Enabled
Add CREATE TABLE statement Enabled
Add IF NOT EXISTS Disabled
Include AUTO_INCREMENT value Enabled
Add CREATE VIEW statement Enabled
Add CREATE PROCEDURE / FUNCTION / EVENT statement Enabled
Add CREATE TRIGGER statement Enabled
Enclose table and field names with backticks Enabled

Warning: A dump containing DROP TABLE statements can overwrite existing tables during restoration. Test restoration in an isolated test database first.

3.7 Data creation options

Setting Recommended value
Truncate table before insert Disabled
INSERT DELAYED Disabled
INSERT IGNORE Disabled
Data export function INSERT
Include column names Enabled
Use extended inserts Enabled
Maximum query length 50000 or phpMyAdmin default
Export binary columns in hexadecimal notation Enabled
Export TIMESTAMP columns as UTC Enabled

In phpMyAdmin, the combined choice may be labelled:

Use both of the above

This includes column names and groups multiple rows into extended INSERT statements.

3.8 Start the export

  • Review the table selection one final time.
  • Click Export.
  • Wait until the download has completed.
  • Do not close the browser or leave maintenance mode before the file has been saved successfully.

4. Back up all phpBB files

The safest method is to copy the entire phpBB installation directory, including hidden files.

Use one of these methods:

  • SFTP;
  • SSH/SCP or rsync;
  • the hosting provider's file manager;
  • a hosting backup function that creates a downloadable archive.

4.1 Particularly important files and directories

Verify that the backup includes at least:

config.php
files/
images/avatars/upload/
ext/
styles/
store/

Depending on the installation, customized content may also exist in:

images/
language/
includes/
vendor/
.htaccess
web.config

Copying the complete installation directory is safer than selecting only individual folders.

4.2 Meaning of important items

Item Purpose
config.php Database connection and phpBB table-prefix configuration
files/ Uploaded attachments
images/avatars/upload/ User-uploaded avatars
ext/ Installed third-party extensions
styles/ Installed and customized styles
store/ phpBB-generated stored files and backups
hidden files Web-server rules and access protection

Security warning: config.php contains database credentials. Store the file backup in a protected location.

4.3 Preserve the file tree

  • Preserve the exact directory structure.
  • Include hidden files.
  • Preserve non-ASCII filenames.
  • Preserve file permissions if supported.
  • Do not convert line endings or encodings.
  • Do not place the archive in a publicly accessible web directory.

Recommended archive name:

flatpress-forum-files_2026-06-28.tar.gz

or:

flatpress-forum-files_2026-06-28.zip

5. Verify the backup

5.1 Verify the database dump

  • Confirm that the file is larger than 0 bytes.
  • Confirm that the GZip archive opens successfully.
  • Inspect the SQL file without changing it.
  • Confirm that it contains many CREATE TABLE statements.
  • Confirm that it contains INSERT INTO statements.

Examples:

CREATE TABLE `phpbb_users` (
INSERT INTO `phpbb_users`

Important tables should include the configured equivalents of:

phpbb_config
phpbb_users
phpbb_groups
phpbb_forums
phpbb_topics
phpbb_posts
phpbb_attachments
phpbb_privmsgs
phpbb_sessions

The actual table prefix may differ.

5.2 Verify the file backup

Check that:

  • config.php exists;
  • files/ exists and is not unexpectedly empty;
  • uploaded avatars are present;
  • extensions and styles are present;
  • hidden configuration files are included;
  • the archive opens without errors.

5.3 Optional SHA-256 checksums

Linux/macOS:

sha256sum flatpress-forum-db_2026-06-28.sql.gz
sha256sum flatpress-forum-files_2026-06-28.tar.gz

PowerShell:

Get-FileHash .\flatpress-forum-db_2026-06-28.sql.gz -Algorithm SHA256
Get-FileHash .\flatpress-forum-files_2026-06-28.zip -Algorithm SHA256

Store the checksum file separately.

6. Test restoration

A successful restoration test is the best proof that the backup is usable.

Use an isolated test environment. Never test restoration directly on the live forum.

6.1 Prepare the test environment

  • Create an empty test database.
  • Create a separate test web directory.
  • Copy the backed-up phpBB files into it.
  • Adjust config.php only in the test copy if database credentials differ.
  • Prevent public access to the test installation.

6.2 Import the SQL dump

  • Open the empty test database in phpMyAdmin.
  • Click Import.
  • Select the .sql.gz file.
  • Start the import.
  • Wait for the success message.
  • Verify that all expected tables were created.

phpMyAdmin can import compressed SQL files such as .sql.gz.

6.3 Validate the restored forum

Check at least:

  • the index page;
  • administrator login;
  • categories and forums;
  • topics and posts;
  • user accounts and permissions;
  • attachments;
  • avatars;
  • private messages where required;
  • extensions;
  • styles;
  • search and posting in the isolated test environment.

Delete or secure the test copy after validation because it contains production data.

7. Leave maintenance mode

Only re-enable the forum after the database dump and file backup have been downloaded and verified.

Open:

General
  -> Board configuration
    -> Board settings

Set:

Disable board: No

Click Submit.

Then:

  • open the forum in a private/incognito browser window;
  • confirm that the maintenance message has disappeared;
  • test login, reading, and posting;
  • record the completion time.

8. Secure storage and retention

Forum backups may contain email addresses, password hashes, IP addresses, private messages, session data, attachments, and database credentials.

Therefore:

  • encrypt backup media or archives;
  • restrict access to authorized administrators;
  • keep at least one copy outside the web server;
  • use more than one storage location;
  • define a retention schedule;
  • delete obsolete backups securely;
  • test restoration regularly.

Recommended backup set:

flatpress-forum-db_YYYY-MM-DD.sql.gz
flatpress-forum-files_YYYY-MM-DD.tar.gz
SHA256SUMS.txt
backup-notes.txt

9. Checklist

  • [ ] Maintenance mode enabled
  • [ ] Maintenance mode verified as a normal visitor
  • [ ] Correct database selected
  • [ ] All forum and extension tables selected
  • [ ] SQL format selected
  • [ ] Structure and data selected
  • [ ] GZip compression enabled
  • [ ] Transaction enabled
  • [ ] Foreign key checks disabled in the dump
  • [ ] DROP and CREATE statements included
  • [ ] Database dump downloaded
  • [ ] Entire phpBB installation copied
  • [ ] config.php included
  • [ ] Attachments and avatars included
  • [ ] Extensions and styles included
  • [ ] Database dump checked
  • [ ] File archive checked
  • [ ] Off-server copy stored securely
  • [ ] Restoration test completed or scheduled
  • [ ] Maintenance mode disabled
  • [ ] Public forum operation verified

10. Sources

org/forum_-_backup.txt ยท Last modified: by fraenkiman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki