Back up the Monitor

By default, the Monitor performs maintenance on the metrics once a day at midnight. Maintenance affects metrics, not alerts.

As an administrator, you can:

  • Schedule the Monitor to back up metrics.

  • Control the amount of disk space that the Monitor uses.

  • Perform maintenance on demand.

 To back up metrics and control the amount of disk space used to store metrics
  1. Log in to the Monitor as an Administrator.

  2. Click Administration.

  3. Select Configuration, and then click Edit.

  4. Click Maintenance.

  5. Specify a time (24-hour clock) when the Monitor should perform maintenance. By default, it performs maintenance at midnight. The time is local to the computer where the Monitor is running. See Understanding how time is displayed.

  6. Specify a directory where the Monitor should save the backed up data. The directory must exist on the computer where the Monitor is running.

  7. Customize the Data Reduction settings:

    • Reduce Metrics To A Representative Daily Value For Metrics Older Than   When you select this option, an average is taken for all numeric metrics that are older than the specified number of days, and then the numeric metrics are deleted. Non-numeric metrics are not deleted.

    • Delete Values Older Than   When you select this option, all metrics that are older than the specified length of time are deleted.

    • Delete Old Metrics When The Total Disk Space Used By The SQL Anywhere Monitor Becomes Greater Than (MB)   When you select this option, you specify the maximum amount of space that can be used to store the metrics. When the amount of disk space used reaches or exceeds the amount specified, the Monitor deletes metrics, starting with the oldest metrics. Metrics are deleted until enough free space exists to store new metrics.

  8. Click Perform Maintenance Now to run the backup immediately. When prompted, click OK.

  9. Click Save.

  10. Click Close.

The following procedure describes how to replace the Monitor database with a backup copy.

 To restore a backup copy of the Monitor database
  1. Stop the Monitor, if it is running.

  2. From your backup directory, copy the samonitor.db database file and samonitor.log log file.

  3. Paste these files into the directory where the current Monitor database and log file are located. When prompted, overwrite the existing files.

    The default locations of the version 12.0.0 Monitor database files are listed in the following table:

    Operating system Monitor directory

    Windows XP (installed with SQL Anywhere)

    C:\Documents and Settings\All Users\Documents\SQL Anywhere 12\Monitor\samonitor.db
    Windows XP (installed on a separate computer)
    C:\Documents and Settings\All Users\Documents\SQL Anywhere 12 Monitor\samonitor.db
    Windows Vista (installed with SQL Anywhere)
    C:\Users\Public\Documents\SQL Anywhere 12\Monitor\samonitor.db
    Windows Vista (installed on a separate computer)
    C:\Users\Public\Documents\SQL Anywhere 12 Monitor\samonitor.db
    Linux (installed with SQL Anywhere)
    /opt/sqlanywhere12/samonitor.db
    Linux (installed on a separate computer)
    /opt/sqlanywhere12/samonitor.db
  4. Re-start the Monitor.