I have a cronjob running that backup's my ubb database and directory. Since it's better to have the board closed while making a backup, I have added a scheduled close for ubb.
open /languages/english/generic.php
Find:
$ubbt_lang['COPY2CLIP'] = 'Copy';
Add below:
$ubbt_lang['BACKUPCLOSED'] = 'Because of a scheduled backup the board is closed from %s until %s';
Repeat editing the generic.php for every other language you have.
open /ubbthreads.php
Find:
$user['USER_STYLE'] = $force ? 0 : $user['USER_STYLE'];
$html->set_style($force);
Add below:
$backupstarttime = "04:30";
$backupstoptime = "04:45";
$backuptime = date("H:i");
if ($backuptime >= $backupstarttime && $backuptime < $backupstoptime) {
$insert = $ubbt_lang['BACKUPCLOSED'];
$closed = true;
$fatal_error = true;
$fatal_error_message = sprintf($insert,$backupstarttime,$backupstoptime);
}
Save, upload, and voila! Board is closed between 04:30 and 04:45.
Adjusting $backupstarttime and $backupstoptime will adjust the times the board will automaticly close.
It will also close the board for admins. The purpose of the close is to make the best database snapshop possible, so you don't want yourself messing around the forum also.
How to backup your forum? Lost of information about the subject on ubbcentral.