Page 1 of 1

Restore configuration snapshot on new install

Posted: Thu May 21, 2015 4:32 am
by fabian.vanderhoeven
Me logserver ran out of diskspace and after adding more space it wouldn't start anymore.
I tried fixing the indexes which where in red state and even deleting some old indexes but it still wouldn't start (the logserver index was also corrupted apparantly).

Now i've started from scratch but i'm unable to restore my configuration (from the snapshots stored in /usr/local/nagioslogserver/snapshots). If I place the old snapshots from the previous installation to this folder, i'm still unable to restore any of them.
Is there a manual way to restore them in elasticsearch?

Re: Restore configuration snapshot on new install

Posted: Thu May 21, 2015 9:41 am
by jolson
There is a script included that you can run manually. Make use of the following commands:

Code: Select all

cd /usr/local/nagioslogserver/scripts/
./restore_backup.sh /store/backups/nagioslogserver.2015-04-29.1430327425.tar.gz
Replace 'nagioslogserver.2015-04-29.1430327425.tar.gz' with the name of your particular backup.

Re: Restore configuration snapshot on new install

Posted: Fri May 22, 2015 1:43 am
by fabian.vanderhoeven
I've tried that but that didn't work for the config snapshots. Right now i'm accepting that the old database is lost. I'm reentering al my input filters (which were a lot).

Re: Restore configuration snapshot on new install

Posted: Fri May 22, 2015 9:10 am
by jolson
If you have the proper snapshot placed in /usr/local/nagioslogserver/snapshots, you should be able to restore from the snapshot section of the Web GUI.

If you cannot, it's likely a permissions problem - please run the following command on the appropriate node:

Code: Select all

ls -l  /usr/local/nagioslogserver/snapshots
The snapshot needs to be owned by nagios:nagios.

Code: Select all

chown nagios:nagios /usr/local/nagioslogserver/snapshots/*

Re: Restore configuration snapshot on new install

Posted: Tue May 26, 2015 2:26 am
by fabian.vanderhoeven
That doesn't work either. On a new installation, it doesn't see the old snapshots if i copy them to that directory. And the new snapshots have nagios:users as owner.

Re: Restore configuration snapshot on new install

Posted: Tue May 26, 2015 1:20 pm
by jolson
I spoke with a developer, and the snapshots are currently not transferable. I have submitted a feature request on your behalf to ensure that in a later release, snapshot will be transferable.