Backup Log?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Backup Log?

Post by jbennett »

I'm having issues with the backup daemon apparently (no backups for 11 days).

I'm wondering where the log is for this?

I've checked /var/log and the only thing that appears to be relevent would be the cronlog.

When I check in there, I find the following:

Code: Select all

Jun 25 01:00:01 NagiosXI crond[21294]: (root) CMD (/usr/local/nagiosxi/scripts/backup_xi.sh)
This tells me that the backup is kicking off, but I don't see anything else related indicating an issue or why the backups aren't being generated.

Any assistance would be greatly appreciated.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

first we should make sure we have disk space available

Code: Select all

df -h
next we should check backups to see the most recent

Code: Select all

ls -l /store/backups/nagiosxi
Finally, you could run a backup manually and check for any reporting of errors

Code: Select all

/usr/local/nagiosxi/scripts/backup_xi.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Backup Log?

Post by jbennett »

scottwilkerson wrote:first we should make sure we have disk space available

Code: Select all

df -h

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      898G   91G  761G  11% /
/dev/mapper/pdc_degdiebfgip1
                       99M   19M   76M  20% /boot
tmpfs                  10G   18M   10G   1% /var/nagiosramdisk
next we should check backups to see the most recent

Code: Select all

ls -l /store/backups/nagiosxi
Short of the backup that I am manually running right now:

Code: Select all

-rw-r--r-- 1 root root 791550161 Jun 13 03:53 1339567203.zip
Finally, you could run a backup manually and check for any reporting of errors

Code: Select all

/usr/local/nagiosxi/scripts/backup_xi.sh
That's what I'm asking. Where would these errors be located? I started a backup earlier and am waiting for it to finish now. Is there somewhere that I can check to see any errors reported by previous backup attempts?

Thanks for your response.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

I guess I am a little confused.

By default Nagios XI doesn't run this script on any interval. If you setup a cronjob to run it you would have to specify where you would like it logged.

Do you have this script running on cron?

What does run on cron by default is a mysql backup, and they are located here

Code: Select all

ls -l /store/backups/mysql
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Backup Log?

Post by jbennett »

ok - perhaps that's the issue. i've taken over this box from someone who didn't share any information about anything they ever did. It makes things a bit interesting on my end to say the least.

When I check the area that you suggested, I see that the folders haven't been updated since July 2011:

Code: Select all

[root@NagiosXI log]# ls -l /store/backups/mysql
total 24
drwxr-xr-x 7 root root 4096 Jul 20  2011 daily
drwxr-xr-x 2 root root 4096 Jul 20  2011 monthly
drwxr-xr-x 7 root root 4096 Jul 20  2011 weekly
It would appear that the previous admin had set up backup_xi.sh to run daily instead of the backups that would normally run.

Now I'm faced with the following questions:

1) should I just keep it the way it is and figure out where he had the cron job setup
2) should I try and get the original backups to function in place of the backup_xi.sh

What am I missing by only running the backup_xi.sh script?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

either way should be fine...

Did your current backup you were running complete without error?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Backup Log?

Post by jbennett »

scottwilkerson wrote:either way should be fine...

Did your current backup you were running complete without error?
Unfortuantely, it's still running...I think that might be part of the issue. The back up size is just too large, maybe?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

This could be the case....

You may want to go back to back to msql backups...

The default was to have the following in /etc/cron.d/nagiosxi for backing up the databases

Code: Select all

# Backup MySQL & PostgreSQL Databases
0   7 * * * root   /root/scripts/automysqlbackup
0   8 * * * root   /root/scripts/autopostgresqlbackup
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Backup Log?

Post by jbennett »

Strange. I only have the following in /etc/cron.d

Code: Select all

[root@NagiosXI cron.d]# ls -l
total 24
-rw-r--r-- 1 root root  60 Aug 12  2010 cacti
-rw-r--r-- 1 root root 139 Jan  9  2007 mrtg
-rw-r--r-- 1 root root 188 Jul 26  2010 sysstat
when I check the cron log, I see the following:

Code: Select all

Jun 25 01:00:01 NagiosXI crond[21294]: (root) CMD (/usr/local/nagiosxi/scripts/backup_xi.sh)
Jun 25 03:00:01 NagiosXI crond[13448]: (root) CMD (/root/scripts/automysqlbackup)
Jun 25 04:00:01 NagiosXI crond[12686]: (root) CMD (/root/scripts/autopostgresqlbackup)
However, I don't have a /root/scripts folder??
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

here are the files that should reside there...
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked