Page 2 of 2

Re: NagiosXI restore problem

Posted: Mon Mar 17, 2014 12:58 am
by Fred Kroeger
Thanks - I downloaded both the backup & restore scripts. It still fails at the first step because it can't find the file my-hostname/nagios.tar.gz in the tarball because it is saved with the timestamp -
# tar tzf /store/backups/nagiosxi/my-hostname.tar.gz | grep nagios.tar.gz
1395034202/nagios.tar.gz

This is how I ran the commands:
Create the Backup

Code: Select all

/usr/local/nagiosxi/scripts/backup_xi-update.sh -n `/bin/hostname -s`
Restore

Code: Select all

# cd /store/backups/nagiosxi

# /usr/local/nagiosxi/scripts/restore_xi-update.sh /store/backups/nagiosxi/my-hostname.tar.gz
tar: [b]my-hostname/nagios.tar.gz[/b]: Not found in archive
tar: Exiting with failure status due to previous errors

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
WARNING: you are trying to restore a  backup on a 64-bit system
         Plugins and other binaries will NOT be restored.

Are you sure you want to continue? [y/N]

Re: NagiosXI restore problem

Posted: Mon Mar 17, 2014 10:18 am
by lmiltchev
If you type "y" and hit "Enter" to continue
Are you sure you want to continue? [y/N]
are you able to restore successfully (regardless of what the message says)?

Re: NagiosXI restore problem

Posted: Mon Mar 17, 2014 6:51 pm
by Fred Kroeger
Yes - with this version of the restore script it does complete successfully after I enter the "y"
So now we are still left with the initial error as I can't run the restore via cron and I don't want to fudge it by sending a 'Y' as it then won't restore the plugins and other binaries.

Fred

Re: NagiosXI restore problem

Posted: Tue Mar 18, 2014 1:31 pm
by lmiltchev
So now we are still left with the initial error as I can't run the restore via cron and I don't want to fudge it by sending a 'Y' as it then won't restore the plugins and other binaries.
I see what you mean. I created a new internal bug report/testing task. As this is not an *actual* bug (backup/restore works fine if you follow the steps, outlined in our docs), it may take some time before/if we fix the issue (not a priority issue). We will let you know when we have a possible solution for you.

Re: NagiosXI restore problem

Posted: Wed Mar 19, 2014 3:20 am
by Fred Kroeger
Thanks - though I'm more inclined to think it is a bug as you are trying to restore a file from a path in the tarball that only exists if the timestamp is used as the tarball filename.
This daily export/import is part of the HA strategy I've employed at this site, so it would be really helpful (to me!) to get a resolution on this sooner rather than later.
- Prod server exports Nagios files & configs
- DR server pulls backup file & imports into Nagios
- Prod Server updates DR Server via NSCA

regards... Fred

Re: NagiosXI restore problem

Posted: Wed Mar 19, 2014 8:05 am
by scottwilkerson
Fred,

We actually did change this internally and it will be in 2014 when released.

Re: NagiosXI restore problem

Posted: Thu Mar 27, 2014 11:16 pm
by Fred Kroeger
Thanks Scott!