Page 1 of 1

Backup errors after 2.4 upgrade

Posted: Wed May 02, 2012 7:39 am
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

Re: Backup errors after 2.4 upgrade

Posted: Wed May 02, 2012 9:49 am
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.

Re: Backup errors after 2.4 upgrade

Posted: Wed May 02, 2012 10:42 am
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

Re: Backup errors after 2.4 upgrade

Posted: Wed May 02, 2012 10:49 am
by scottwilkerson
Yes that's fine (I don't believe that is from the XI installer)

Re: Backup errors after 2.4 upgrade

Posted: Wed May 02, 2012 12:15 pm
by hhlodge
It's definitely a script and cron entry that Nagios put there, not me.

Re: Backup errors after 2.4 upgrade

Posted: Wed May 02, 2012 12:25 pm
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..

Re: Backup errors after 2.4 upgrade

Posted: Wed May 02, 2012 12:36 pm
by hhlodge
I have just fixed the down side with a new cron job. :) :D

Re: Backup errors after 2.4 upgrade

Posted: Wed May 02, 2012 12:44 pm
by scottwilkerson
perfect.