Back Up and Restore the Log Server Database Manually

To back up and restore your Log Server database, you can use one of two methods: the Log Server back up and restore feature in WatchGuard Server Center, or run the manual back up and restore utilities from the command line.

We recommend that you use back up and restore feature in WatchGuard Server Center. You can complete back up and restore procedures for your Log Server with the click of a button.

For more information about how to back up or restore your Log Server database from WatchGuard Server Center, go to Configure Database Maintenance Settings.

You can also use the command line to manually back up or restore your Log Server database. From the command line, you can run the pg_dump.exe utility to create a file that contains the entire contents of your Log Server database. This file is called a dump file. You can use this file and the pg_restore.exe utility to restore the database on the current server, or to move the Log Server to a different server.

  1. Open a command prompt.
  2. Type cd C:\Program Files (x86)\WatchGuard\wsm11\postgresql\bin and press Enter to change your working directory.
    Use the appropriate version number for your WSM installation.
  3. Type pg_dump -v -f "c:\log.backup" -F c -Z 5 -U wguser wglog and press Enter.
  4. When requested, type your Administrator passphrase.
    The contents of your Log Server database are saved to the specified path and filename, in your current working directory (selected in Step 1).
  5. Copy the backup file to the new Log Server computer (for example, C:\log.backup) and stop the Log Server.
    For more information, go to Start and Stop the Log Server.
  6. At a command prompt, change your current working directory to C:\Program Files (x86)\WatchGuard\wsm11\postgresql\bin.
  7. Select an option to restore the database:
    • To restore the database backup on an existing Log Server computer that has a Log Server database installed and configured with the WatchGuard Server Center Setup wizard, type pg_restore -c -d wglog -U wguser -v "c:\log.backup" and press Enter.
      The message "pg_restore: connecting to database for restore" appears, followed by a prompt to enter a password.
      Type your Administrator passphrase and press Enter.
      The Log Server database is overwritten with the contents of the database dump file.
    • To restore the database backup on a new Log Server computer that does not have a database created and configured with the WatchGuard Server Center Setup wizard, type pg_restore -C -d wglog -U wguser -v "c:\log.backup" and press Enter.
      The message "pg_restore: connecting to database for restore" appears, followed by a prompt to enter a password.
      Type your Administrator passphrase and press Enter.
      The database is created and the backup file contents are imported into the new Log Server.
  8. Start the Log Server.
    For more information, go to Start and Stop the Log Server.

Related Topics

Configure Database Size, Authentication Key, and Diagnostic Log Settings

About Firebox Logging and Notification

Use Scripts, Utilities, and Third-Party Software with the Log Server