This article describes how to configure WG to create automatic configuration backups with a unique file name and time stamp. WG then pushes them to a remote host using
FTP/SFTP/FTPS/SCP/HTTP(S).
Create a File System Logging entry:
- Open the WG manager.
- Select Policy, Settings, Engines.
- Right-click File System Logging and click Add.
- Name the entry distinctively so you can quickly identify it among your other logging settings. We recommend the name Automatic Backup.
- Type a log name, such as backup.log.
- Deselect Enable log buffering and click OK.
Rotate and push the new backup.log file:
Specify when to rotate the
backup.log file and push it to a remote host.
- Select the File System Logging entry defined in the previous section.
- On the right side, expand Settings for Rotation, Pushing, and Deletion.
- Select Enable specific settings for user-defined log.
- Under Auto Rotation, select Enable auto rotation and Enable scheduling of log file rotation (format: hh:mm). Enter the time that you want the rotation to occur. The rotation time is important because we create a scheduled backup job that must run before the rotation time. For example, scheduling the backup creation for 1 a.m. and rotating and pushing the file at 2 a.m.
- Under Auto Deletion, click Enable auto deletion of unchanged files and enter 2 days. You don't need to keep automatic backup files on the appliance because they're stored safely on your destination server.
- Under Auto Pushing, click Enable auto pushing and define your destination server. This example uses an FTP server.
- Select Enable pushing of log files directly after rotation.
Schedule the automatic backup:
Create a scheduled job for the automatic backup.
- Select Configuration, Central Management, Advanced Scheduled Jobs.
- Click Advanced Scheduled Jobs and open the Job list.
- Click Add and an Edit Scheduled Job field displays.
- In the Start job drop-down list, select the frequency at which you want the scheduled job to run. We recommend Daily.
- Define the time at which you want the scheduled job to run in the next three fields (24-hour clock). Creating a job for 1 a.m. every day would look like: Daily, 0 minute, 1 hour, day is grayed out. This scheduled job is started daily, set to run at 1:00 AM. For example, you schedule the backup creation for 1 a.m. and rotate and push the file at 2 a.m.
NOTE: The day field can be used to run a monthly report on the 5th of each month.
- Under Job settings, set the drop-down option to Backup Configuration and give this job a Unique job ID. This value is your choice, provided it doesn't conflict with any other existing scheduled jobs. The addition of a job description is optional. But, it might be helpful to reference what the job is configured to accomplish. Then, if a problem arises and further change is needed, it's clear what this job is intended to do.
- Under Parameter Settings, select Use most recent configuration.
- In the Save configuration to backup field, type the full path to the backup.log file. The path here must be entered in the following format: /opt/mwg/log/user-defined-logs/backup.log/backup.log. The duplicate backup.log in the defined /path/file.extension field is needed because the directory for these files is named backup.log and the new log entry is defined as backup.log. (It's named backup.log automatically by creating a new File System Logging entry.) File names created by this job are named as follows: backup1309040200-10.10.76.10.log
Restore the configuration from the backup.log file:
If needed, you can restore a backup as follows.
- Select Troubleshooting, Backup/Restore.
- Click Restore from File and select the file.
NOTE: Change the Files of type drop-down option to All Files. This setting allows WG to see the backup that it uses for restoring. The files created aren't automatically found when performing a restore. When the user interface tries to find the backup file, it looks for a .backup extension.
- Click Open. The restore is performed and logs you out of the user interface.