Error when backing up before upgrade
Re: Error when backing up before upgrade
Can you try running tar with the verbose flag as nscott suggested?
Re: Error when backing up before upgrade
I did run that command and posted my results:
---------------------------------
Scott,
I tried to run the command above but got the same results.
I execute the command and it never returns to the login prompt.
Any advice.
Regards
----------------------------------
I gave up trying to do what should be a simple upgrade and took the system out of production.
too many headaches and problems.
---------------------------------
Scott,
I tried to run the command above but got the same results.
I execute the command and it never returns to the login prompt.
Any advice.
Regards
----------------------------------
I gave up trying to do what should be a simple upgrade and took the system out of production.
too many headaches and problems.
Re: Error when backing up before upgrade
Even when I try to execute the following commands for the upgrade I get an error:
[root@nagxi ~]# service nagiosxi stop
[root@nagxi ~]# service npcd stop
NPCD Stopped.
[root@nagxi ~]# service ndo2db stop
Stopping ndo2db: done.
[root@nagxi ~]# service nagios stop
Stopping nagios: ./etc/init.d/nagios: line 182: kill: (15972) - No such process
done.
[root@nagxi ~]# service nagiosxi stop
[root@nagxi ~]# service npcd stop
NPCD Stopped.
[root@nagxi ~]# service ndo2db stop
Stopping ndo2db: done.
[root@nagxi ~]# service nagios stop
Stopping nagios: ./etc/init.d/nagios: line 182: kill: (15972) - No such process
done.
Re: Error when backing up before upgrade
c0ldf1r3,
I'm curious as to what the output of the tar with the verbose flag was. How far did it get? Or did it just sit blank? I'm not seeing a post that contains that information, but it would be helpful information for diagnosing your issue.
Well the good news is that did actually stop the nagios process. The less good news is that implies that there were multiple nagios -d processes running concurrently. While that is not a good thing, it IS a good thing that that would definitely show up in the nagios logs. There should be something toward the bottom (after you stopped this service, if its a long time and you restarted and have a lot of checks running it would) about what failed. The dual running processes might even explain why the backup was hanging.
In summary, check the logs, and do a dump of them on here if you wish, and bring us up to speed on exactly what happened when you ran the tar job with a verbose flag.
I'm curious as to what the output of the tar with the verbose flag was. How far did it get? Or did it just sit blank? I'm not seeing a post that contains that information, but it would be helpful information for diagnosing your issue.
Well the good news is that did actually stop the nagios process. The less good news is that implies that there were multiple nagios -d processes running concurrently. While that is not a good thing, it IS a good thing that that would definitely show up in the nagios logs. There should be something toward the bottom (after you stopped this service, if its a long time and you restarted and have a lot of checks running it would) about what failed. The dual running processes might even explain why the backup was hanging.
In summary, check the logs, and do a dump of them on here if you wish, and bring us up to speed on exactly what happened when you ran the tar job with a verbose flag.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Error when backing up before upgrade
after I ran and then manually stopped the process from this morning until this afternoon the file is:
rw-r--r-- 1 root root 52690944 Aug 3 13:21 usr-local-nagios.tar.bz2
Which logs are you looking for as I would be happy to provide them. Anything to try and get this resolved.
rw-r--r-- 1 root root 52690944 Aug 3 13:21 usr-local-nagios.tar.bz2
Which logs are you looking for as I would be happy to provide them. Anything to try and get this resolved.
Re: Error when backing up before upgrade
The log I'm talking about is /usr/local/nagios/var/nagios.log, however I missed the part where you had 18 million files. There is no quick way to compress that many files, short of using a faster compression scheme like gzip, which is, at least 2x as fast, but doesn't have near the compression ratio.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Error when backing up before upgrade
so my basic question is why would such a small install of nagios be impossible to upgrade??
if there is no way to follow the script outlined for upgarding what is the purpose?
if there is no way to follow the script outlined for upgarding what is the purpose?
Re: Error when backing up before upgrade
The upgrade itself will actually work and will most likely not destroy your data. The backup is for disaster recovery in case the unthinkable happens. The backup is for safety reasons, which you are not required to do to properly upgrade the Nagios XI instance. You are also not required to back it up in the same fashion that is outlined in the document, if you are confident in the backup methods that you have installed, then you won't have to worry about backing it up as described in the doc. Most people I talk to about backups have Nagios running in a virtualized environment, and take snapshots as opposed to backing it up.
If however, you do not have a backup solution, and wish to backup then before an upgrade is an idea time. It is a time consuming task to backup a large set of files, and the way referenced in the doc is a sure fire way to backup, however it will take a while, but it will work for every install. You can try reducing the compression ratio by using different methods, but any way you slice it, if you want to backup something with so many files, it will take a while. You could try using a lower compression ratio or a different method for compressing (tar.gz instead of tar.bz2), infact, lzop is very fast, this will be the fastest compression method for you. Please be sure that you have enough hard disk space for a backup.
yum install lzop -y
tar --use-compress-program=lzop -cvf /tmp/backupcore.tar.lzo /usr/local/nagios/*
tar --use-compress-program=lzop -cvf /tmp/backupxi.tar.lzo /usr/local/nagiosxi/*
mysqldump -u root -pnagiosxi nagios > /tmp/nagios.sql
mysqldump -u root -pnagiosxi nagiosql > /tmp/nagiosql.sql
If however, you do not have a backup solution, and wish to backup then before an upgrade is an idea time. It is a time consuming task to backup a large set of files, and the way referenced in the doc is a sure fire way to backup, however it will take a while, but it will work for every install. You can try reducing the compression ratio by using different methods, but any way you slice it, if you want to backup something with so many files, it will take a while. You could try using a lower compression ratio or a different method for compressing (tar.gz instead of tar.bz2), infact, lzop is very fast, this will be the fastest compression method for you. Please be sure that you have enough hard disk space for a backup.
yum install lzop -y
tar --use-compress-program=lzop -cvf /tmp/backupcore.tar.lzo /usr/local/nagios/*
tar --use-compress-program=lzop -cvf /tmp/backupxi.tar.lzo /usr/local/nagiosxi/*
mysqldump -u root -pnagiosxi nagios > /tmp/nagios.sql
mysqldump -u root -pnagiosxi nagiosql > /tmp/nagiosql.sql
Nicholas Scott
Former Nagios employee
Former Nagios employee