Restore script errors
Restore script errors
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?
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?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Restore script errors
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
Both the backup and restore were Nagios XI 2012R1.3
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Restore script errors
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.
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
Thanks, that was it.
Re: Restore script errors
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?
I have extracted the nagios.tar.gz file from my backup, but I'm not seeing a time stamped file within that tar ball?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Restore script errors
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
Yo will see you now have 1348511708.tar
1348511708.tar.gz is what you would need to rename the file to.
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
Code: Select all
gunzip nagiosxi.tar.gzCode: 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
1348511708.tar.gz is what you would need to rename the file to.
Re: Restore script errors
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.tarLooking 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?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Restore script errors
likely yes
Re: Restore script errors
So, I'm just renaming the original file to the original name? Apparently, somewhere along the way, I've gotten lost...
I should note that within the 1358874081.tar.gz file, I do have nagios.tar.gz already.
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]