ew_backup
Overview
The ew_backup component is responsible for making the automatic mnesia database backups.
The ew_backup registers new gen_server under the wpart application's supervisor and starts to listening for the backups requests.
Configuration
ew_backup accepts the following configuration parameters:
{frequency, X} - sets the backups frequency to the desired level. X could be:
{Y, minute} - backup will be performed every Y minutes
{Y, hour} - every Y hours
{Y, day} - every Y days
disabled - disables the backups
Y - every Y miliseconds
- Note that all numeric values must be integers. By default backuping is disabled.
{output_dir, Dir} - specifies the output directory for the backups. The path could be either relative to the server root or absolute. By default it is set to "backup".
Example
{ew_backup, [{frequency, {2, day}}, {output_dir, "mnesia_backups"}]}
API
do_backup() - triggers the backup. Could be performed by user.
load_backup(Filename) - restores the previous mnesia state from the selected backup.
set_frequency(Freq) - changes the backup frequency. The Freq format is the same as used in the configuration file.
set_dir(Dir) - sets the backup output directory
