Back to OP5 Monitor FAQ

How to find backups of previous configuration saves by Nachos

Before every attempt to commit a save, Nachos will save the current configuration, which is very likely the same thing as a working configuration, to /var/cache/naemon

The directory will contain tar files that look like this:

  -rw-r--r-- 1 monitor apache 510K Feb 12 13:05 1613131543.tar
  -rw-r--r-- 1 monitor apache 510K Feb 12 13:07 1613131680.tar
  -rw-r--r-- 1 monitor apache 510K Feb 12 13:15 1613132139.tar
  -rw-r--r-- 1 monitor apache 510K Feb 12 15:24 1613139852.tar
  -rw-r--r-- 1 monitor apache 510K Feb 12 15:31 1613140321.tar

This behavior can be altered in nachos.cfg through the following settings:

config_backup_path = /var/cache/naemon/
days_to_keep_backups = 10

These tar files include your entire etc/ directory, and as such can be used to restore your configuration by shutting down Monitor (mon stop), then replacing the /opt/monitor/etc directory.

After doing this, you may want to force a reimport of the on-disk configuration files to your database by running the following command, which will check the validity of the configuration files first:

asmonitor /usr/bin/naemon --verify-config /opt/monitor/etc/naemon.cfg && echo "Now running undo_config..." && php /opt/monitor/op5/nacoma/api/monitor.php -u monitor -a undo_config
["Geneos"] ["FAQ"]

Was this topic helpful?