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

Re: Backup Log?

Post by jbennett »

Thank you much!

The fact that these files were missing entirely concerns me.

Is simply dropping them in place enough to get those backups running again?

Being that the log file showed that they were being called, but that they weren't running, is there anywhere that this failure would have been logged?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Backup Log?

Post by slansing »

You would be fine just placing those files in the directory as all the other required parts have been included in Nagios XI.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

jbennett wrote:Being that the log file showed that they were being called, but that they weren't running, is there anywhere that this failure would have been logged?
By default the messages are sent to the root users mailbox for these. This is set in the cron file, if you wanted the error messages to go somehwere else you could change the /etc/cron.d/nagiosxi to be something like this:

Code: Select all

# Backup MySQL & PostgreSQL Databases
0   7 * * * root   /root/scripts/automysqlbackup > /path/to/your.log 2>&1
0   8 * * * root   /root/scripts/autopostgresqlbackup > /path/to/your.log 2>&1
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 »

I just tried to run the backup once more and noticed this at the end:

Code: Select all

zip error: Entry too big to split, read, or write (file exceeds Zip's 4GB uncompressed size limit)
Previously, my session had disconnected before I could see this.

This answers a lot of questions.

I have a check that is running to monitor the /store/backups/nagiosxi directory for the latest file and make sure it's over a certain size as well as no older than a certain number of hours.

Since I apparently have to move away from this backup script and to the standard scripts, is there any documentation on these? I want to monitor the backups to make sure they are at least being generated every so often and are above a certain size. This was what alerted me to this issue in the first place, so I view it as invaluable at this point.

A) is there anything out there already for checking this?
B) if I were to modify my current check, am I correct in assuming that these are the folders I would need to monitor? Am I missing anything here?
  • /store/backups/mysql/daily
    • information_schema
    • mysql
    • nagios
    • nagiosql
    • test
  • /store/backups/mysql/weekly
    • information_schema
    • mysql
    • nagios
    • nagiosql
    • test
  • /store/backups/mysql/monthly
    • information_schema
    • mysql
    • nagios
    • nagiosql
    • test
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

I am attaching 2 files that have been modified to use tarball instead of zip.

The files in the attachment can be placed in /usr/local/nagiosxi/scripts

These will be in future versions of XI but did not make it into 2011R3.2 (released today). If you upgrade after replacing the files you will need to re-replace them after the upgrade to 2011R3.2.
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
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Backup Log?

Post by jbennett »

Thanks!

So, these files will allow the back-up that was running before to run again and be over 4GB in size, correct?

I appreciate it!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

Yes, I just modified the files to use tar.gz instead of zip, there should be no limit
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 »

I'm happy to report that my backups ran great all weekend. Thanks again for the help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Log?

Post by scottwilkerson »

Perfect. We will be making the change from .zip to tar.gz permanent in future releases.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked