The Forum Backup admin control panel allows the administrator to generate a backup of all the forum data that is stored on disk and in the database. If PHP's gzip module is available the administrator may choose to compress the backed up data, to save drive space. This backup can later be restored to a forum running the same version of the forum.
Note: Responsible forum administrators will not only backup their forums regularly, but also perform test restores after making changes or upgrading to newer versions of the forum.
IMPORTANT: You cannot restore to a different version of the forum. You may want to save a copy of the install script with your backup files. |
Contents |
Enter the full path on disk where you wish to save the forum data dump or accept the default (forum's tmp directory).
Compress the backup file using Gzip compression. This will make the backup process a little slower, but will save a lot of harddrive space. The default is Yes.
Do not backup search related database tables. If you select this option you will have to rebuild your search index after importing the dump. This will make the backup much smaller and quicker, especially on large forums.
Besides using the provided Admin Control Panel, users may also need to run backups from command line and schedule them via cron or other system schedulers.
To run a command like backup, you need to be in the forum's adm directory:
cd .../forum/adm
Run admdump.php with PHP's command line interpreter to see usage info:
/usr/bin/php ./admdump.php Usage: php admdump.php /path/to/dump_file [compress] - 'compress' is optional; specify only if you want to compress the dump_file.
OK, let's run it by specifying the dump_file as the first argument:
/usr/bin/php ./admdump.php /tmp/forum.fud
Here is a crontab like that can be used for automated forum backups:
# Weekly forum backups 0 1 * * 6 (cd /var/www/adm/; /usr/bin/php ./admdump.php /tmp/backup.fud compress) >/tmp/backup.log 2>&1
The backup script supports authentication via HTTP. The example below demonstrates how to take scheduled forum backups using this technique:
Example of an automated Forum Backup Script:
echo -e 'submitted=1\n&compress=1\n&path=/home/user/forum/backup/FUDforum_'`date +%Y%m%d`'.gz' | lynx http://YOUR_FORUM_URL/adm/admdump.php?do_http_auth=1 -auth=ADMIN_LOGIN:ADMIN_PASS -post_data
The parameters that are piped to the lynx utility represent the POST data. There are 2 arguments that you can change.
The other two options are ADMIN_LOGIN, ADMIN_PASS, which represent the login and password of the admin account. Since this is sensitive information, I highly recommend that you ensure other users on the server cannot read this file. For example, if you placed your backup code inside the shell script that would be executed by cron, make the shell script's permissions 500, thus only allowing the root user and yourself to read and execute it.
Needless to say, the YOUR_FORUM_URL should be replaced with your forum's URL.
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Can't contact the database server: Cannot return last error, no db connection)