Backup errors after 2.4 upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hhlodge
Posts: 206
Joined: Tue Mar 08, 2011 2:13 pm

Backup errors after 2.4 upgrade

Post by hhlodge »

Hi,

I upgraded from 1.9 to 2.4 yesterday. This morning I received two separate email message reports for the PostgreSQL Backup Log, with different message-ids but both reflecting running at the same time. 08:01. I also got this error message from cron via email.

gzip: /store/backups/postgresql/daily/nagiosxi/nagiosxi_2012-05-02.Wednesday.sql: No such file or directory
gzip: /store/backups/postgresql/daily/postgres/postgres_2012-05-02.Wednesday.sql: No such file or directory
gzip: /store/backups/postgresql/daily/template1/template1_2012-05-02.Wednesday.sql: No such file or directory

Code: Select all

[root@psm-itmon log]# grep autopostgresqlbackup /var/log/cron
May  2 08:00:01 psm-itmon crond[5315]: (root) CMD (  /root/scripts/autopostgresqlbackup)
May  2 08:00:01 psm-itmon crond[5319]: (root) CMD (/root/scripts/autopostgresqlbackup)

[root@psm-itmon cron.d]# grep postgres /var/spool/cron/root 
0 8 * * *       /root/scripts/autopostgresqlbackup
[root@psm-itmon cron.d]# grep postgres /etc/cron.d/*
/etc/cron.d/nagiosxi:0   8 * * * root   /root/scripts/autopostgresqlbackup
It appears the upgrade added a second iteration in /etc/cron.d/nagiosxi. I suspect I should remove the one in root's crontab, if that is correct approach for future upgrades. However, it did not add this full XI backup there. Should it have?

# Nagios XI backup - full
0 21 * * * /usr/local/nagiosxi/scripts/backup_xi.sh > /var/log/backup_xi.log 2>&1
- Kyle
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup errors after 2.4 upgrade

Post by scottwilkerson »

Yes it would be best to remove the 2 entries form the root users crontab.

I'm going to have our install script developer take a look to see why it didn't get removed as it was supposed to.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hhlodge
Posts: 206
Joined: Tue Mar 08, 2011 2:13 pm

Re: Backup errors after 2.4 upgrade

Post by hhlodge »

And this nightly full Nagios XI backup should remain in root's crontab file?

Code: Select all

# Nagios XI backup - full
0 21 * * * /usr/local/nagiosxi/scripts/backup_xi.sh > /var/log/backup_xi.log 2>&1
- Kyle
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup errors after 2.4 upgrade

Post by scottwilkerson »

Yes that's fine (I don't believe that is from the XI installer)
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hhlodge
Posts: 206
Joined: Tue Mar 08, 2011 2:13 pm

Re: Backup errors after 2.4 upgrade

Post by hhlodge »

It's definitely a script and cron entry that Nagios put there, not me.
- Kyle
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup errors after 2.4 upgrade

Post by scottwilkerson »

This must have been before I arrived here..

This script is optional and I'll give you the positive and negative sides of having it run daily.

On the plus side, you have a daily backup that you could restore to if your configuration got all messed up.

The only real down side is that it doesn't remove old backups which is going to start using a fair amount of hard drive space over time..
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hhlodge
Posts: 206
Joined: Tue Mar 08, 2011 2:13 pm

Re: Backup errors after 2.4 upgrade

Post by hhlodge »

I have just fixed the down side with a new cron job. :) :D
- Kyle
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup errors after 2.4 upgrade

Post by scottwilkerson »

perfect.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked