Restore configuration snapshot on new install

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
fabian.vanderhoeven
Posts: 14
Joined: Thu May 21, 2015 4:13 am
Location: The Netherlands

Restore configuration snapshot on new install

Post 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?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Restore configuration snapshot on new install

Post 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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
fabian.vanderhoeven
Posts: 14
Joined: Thu May 21, 2015 4:13 am
Location: The Netherlands

Re: Restore configuration snapshot on new install

Post 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).
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Restore configuration snapshot on new install

Post 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/*
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
fabian.vanderhoeven
Posts: 14
Joined: Thu May 21, 2015 4:13 am
Location: The Netherlands

Re: Restore configuration snapshot on new install

Post 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.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Restore configuration snapshot on new install

Post 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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked