Page 1 of 2
Restore script errors
Posted: Wed Jan 16, 2013 4:24 pm
by BenCowan
At some point the Backup and Restore scripts changed from using zip/unzip to gzip/tar, and ever
since I get the following errors:
tar: nagiosxi_backup/nagios.tar.gz: Not found in archive
tar: Error exit delayed from previous errors
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: usr/local/nagios/bin/nagios: Not found in archive
tar: Error exit delayed from previous errors
WARNING: you are trying to restore a backup on a 64-bit system
Plugins and other binaries will NOT be restored.
Can NagiosXI also include the option to use the old method of backup and restore?
Re: Restore script errors
Posted: Wed Jan 16, 2013 4:55 pm
by slansing
What version of Nagios XI are you currently running, and what version was the backup you are trying to restore made from?
Re: Restore script errors
Posted: Wed Jan 16, 2013 5:23 pm
by BenCowan
Both the backup and restore were Nagios XI 2012R1.3
Re: Restore script errors
Posted: Wed Jan 16, 2013 6:15 pm
by scottwilkerson
The restore script expects that the file hasn't been renamed
If you look in the tarball you will see that the inside it is named with a timestamp
If you rename your nagios.tar.gz file to the appropriate {timestamp}.tar.gz it should work fine.
Re: Restore script errors
Posted: Thu Jan 17, 2013 1:26 pm
by BenCowan
Thanks, that was it.
Re: Restore script errors
Posted: Thu Jan 24, 2013 10:54 am
by jbennett
I have run into this same issue on 1.4.
I have extracted the nagios.tar.gz file from my backup, but I'm not seeing a time stamped file within that tar ball?
Re: Restore script errors
Posted: Thu Jan 24, 2013 12:00 pm
by scottwilkerson
Actually, the backup script will make a file like 1348511708.tar.gz
If you rename this file to nagiosxi.tar.gz, in order to find out what you need to rename it back to you would need to run
then
Code: Select all
ls -l
total 202776
-rw-r--r-- 1 root root 95129600 Sep 24 13:35 1348511708.tar
-rw-r--r-- 1 root root 61867430 Nov 28 12:46 nagiosxi.tar.gz
Yo will see you now have 1348511708.tar
1348511708.tar.gz is what you would need to rename the file to.
Re: Restore script errors
Posted: Thu Jan 24, 2013 12:09 pm
by jbennett
Code: Select all
# mv 1358874071.tar.gz nagiosxi.tar.gz
# gunzip nagiosxi.tar.gz
# ls -l
total 1527672
-rw-r--r-- 1 root root 1535805440 Jan 22 12:00 nagiosxi.tar
Unfortunately, I don't get that same result.
Looking at your example, the time stamp is the same as the original file name, couldn't I just rename nagiosxi.tar as 1358874071.tar then gzip it again?
Re: Restore script errors
Posted: Thu Jan 24, 2013 1:34 pm
by scottwilkerson
likely yes
Re: Restore script errors
Posted: Thu Jan 24, 2013 2:03 pm
by jbennett
So, I'm just renaming the original file to the original name? Apparently, somewhere along the way, I've gotten lost...
Code: Select all
# mv nagiosxi.tar 1358874071.tar
# gzip 1358874071.tar
# ls -lh
total 1.1G
-rw-r--r-- 1 root root 1.1G Jan 22 12:00 1358874071.tar.gz
# /usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/1358874071.tar.gz
tar: 1358874071/nagios.tar.gz: Not found in archive
tar: Error exit delayed from previous errors
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: usr/local/nagios/bin/nagios: Not found in archive
tar: Error exit delayed from previous errors
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]
I should note that within the 1358874081.tar.gz file, I do have nagios.tar.gz already.