With Big Medium 2.0.4, your favorite neighborhood CMS learned how to back up its own data. Learn how to use this new feature.
With the release of Big Medium 2.0.4, your favorite neighborhood CMS learned how to back up its own data, taking compressed snapshots of itself on a regular schedule.
For the moment, however, this is a “hidden” feature that is turned off by default. Big Medium knows how to make backups, but it doesn’t yet know how to automatically restore those backups to put Humpty Dumpty back together again. This means that restoring from backup requires you to uncompress the backup files and move directories around under the hood. It’s not terribly difficult work, but it’s just complex enough that I consider the backup feature a tool for advanced users. Until I get around to adding a “restore from backup” feature and a control-panel interface for managing backups, the feature is off by default.
Want to turn it on? Here’s how.
The backup feature requires that your server knows how to make zip or gzip archives. If your server is Unix-flavored, you’re almost certainly good to go. If you’re running a Windows server, your hosting company or server admin may need to install the zip and unzip applications.
Here’s a quick way to check if your server has the necessary know-how: Go to “Library>Document Library” in Big Medium and then click “Batch upload.” If there’s a “Zipped” tab on the next screen, your server knows how to zip/unzip files.
To turn backups on, open the moxiebin/bm-setup.pl file in a text editor. Locate these three lines:
'BACKUP_FREQ' => '1',
'BACKUP_HOUR' => '2',
'BACKUP_KEEP' => '0',
Change these settings based on your backup predilections:
BACKUP_FREQ: The frequency of backups in days. Leave this value at '1' for daily backups, change to '2' for every-other-day backups, to '7' for weekly backups, etc.
BACKUP_HOUR: The hour of the day (0-23) in local server time when you want the backups to be generated. I recommend making backups in the wee hours; the default setting of '2' will make backups at 2:00 am (or, more specifically, the first time that Big Medium’s maintenance script runs after 2:00 am).
BACKUP_KEEP: The number of backups to keep before recycling. If set to '0', no backups will be run at all.
So, to make daily backups at 2:00am and keep backups for five days, you would use these settings:
'BACKUP_FREQ' => '1',
'BACKUP_HOUR' => '2',
'BACKUP_KEEP' => '5',
Or, to make weekly backups at midnight and keep backups for four weeks:
'BACKUP_FREQ' => '7',
'BACKUP_HOUR' => '0',
'BACKUP_KEEP' => '4',
After making your changes to moxiebin/bm-setup.pl, Big Medium will start making your backups at the appointed hour.
Big Medium stashes its backups in the moxiedata/backups directory. Each backup snapshot is named with the date and time when it was made (e.g., 2008.08.28-02.01.05). Inside are three more directories (moxiedata-files, public-files and bmadmin-theme) which contain compressed archives of data files, image/document files and custom themes respectively.
For instructions on how to use these compressed files to restore a backup, check out these instructions: How do I restore a Big Medium installation from backup?