Page 1 of 1

Retoring a Downloaded Configuration Snapshot

Posted: Thu Jun 23, 2016 4:26 am
by Deantwo
I downloaded a configuration snapshot today before attempting a larger test.
To keep this short and to the point, the test caused the server to crash and burn.

I restored a backup I made this morning without issue, but found out that configuration snapshots are a separate thing.
So I would like to restore the configuration snapshot I downloaded, since this snapshot was made after I made the morning backup.

But attempting to restore the Configuration Snapshot greets me with the following: This snapshot doesn't exist

I followed the directions given in this thread: https://support.nagios.com/forum/viewto ... =6&t=31854
But there was never any confirmation about if it worked, and I am having issues still.

Commands used:
  • chown nagios.nagios DesiredSnapshot.1466666991.tar.gz
  • chmod -R 644 /usr/local/nagiosxi/nom/checkpoints/nagioscore/archives/*
Result of ll /usr/local/nagiosxi/nom/checkpoints/nagioscore/archives/

Code: Select all

total 76
-rw-r--r-- 1 nagios nagios 33652 Jun 23 09:31 DesiredSnapshot.1466666991.tar.gz
-rw-r--r-- 1 nagios nagios 33273 Jun 15 10:54 OldSnapshot.1465906863.tar.gz
-rw-r--r-- 1 nagios nagios  1321 Jun 15 10:54 OldSnapshot.1465906863.txt

Re: Retoring a Downloaded Configuration Snapshot

Posted: Thu Jun 23, 2016 9:42 am
by ssax
That snapshot archive file is just the Nagios Core files, in order to restore you will also need the nagiosql backup in /usr/local/nagiosxi/nom/checkpoints/nagiosxi as it uses that to restore the data.

Code: Select all

[root@ssc66xid nagiosxi]# ls -l /usr/local/nagiosxi/nom/checkpoints/nagiosxi
total 360
-rw-r--r-- 1 nagios nagios 35268 Jun 21 09:56 1466521005_nagiosql.sql.gz
Do you have that file?

Re: Retoring a Downloaded Configuration Snapshot

Posted: Fri Jun 24, 2016 1:30 am
by Deantwo
ssax wrote:Do you have that file?
No, there is no corresponding *_nagiosql.sql.gz file, not even in /usr/local/nagiosxi/nom/checkpoints/nagiosxi/archives.
The file was likely lost when I restored the backup.

So what is the point of the CCM -> Configuration Snapshots -> Download button if it doesn't download all the necessary files?
A "upload" button would also make it a lot easier to use.

Should I file a bug report and/or feature request for this?

Re: Retoring a Downloaded Configuration Snapshot

Posted: Fri Jun 24, 2016 9:24 am
by ssax
You could still technically restore the configs from the files, you would just have to import them. I've created a feature request here:

Code: Select all

NEW TASK ID 8912 created - Nagios XI Feature Request: Downloading snapshot does not include the XI nagiosql backup file and you can't restore without it
And here:

Code: Select all

NEW TASK ID 8913 created - Nagios XI Feature Request: Add the ability to upload config snapshots in the web UI

Re: Retoring a Downloaded Configuration Snapshot

Posted: Fri Jun 24, 2016 9:38 am
by Deantwo
ssax wrote:I've created a feature request
Awesome, thanks.

I just made the configuration again, I hadn't changed much in between the backup and the snapshot.
So you can close this thread now if you want.

Re: Retoring a Downloaded Configuration Snapshot

Posted: Fri Jun 24, 2016 9:56 am
by mcapra
Closing this thread