This is a cache of https://support.nagios.com/kb/article/nagios-xi-schedulded-backups-no-longer-working-514.html. It is a snapshot of the page at 2025-05-14T00:09:14.921+0000.
Nagios <strong>xi</strong> - Schedulded Backups No Longer Working
Home » Categories » Multiple Categories

Nagios xi - Schedulded Backups No Longer Working

Problem Description

When looking at the location that the scheduled backups are stored in, there are no new xxxxxxx.tar.gz files being created in this location.

Additionally,  in the /store/backups/nagiosxi/ location there are lots of folders that are not being removed as per the Backup Limit setting.

 

Explanation

The root cause of the issue is that the backups are failing. When this happens the following occurs:

  • The backup does not complete, hence a xxxxxxx.tar.gz file is not created

  • The temporary /store/backups/nagiosxi/xxxxxxx folder is not deleted

    • These folders will not be cleaned up as part of the backup limit setting, they will need to be manually deleted

 

The most common cause of the backup failing is due to a database corruption.

 

Resolving The Problem

To identify why the backups are failing, you will need to execute a manual backup in an SSH session on your Nagios xi server. This will generate verbose output that will help determine why the backup is failing.

The procedure for performing a manual backup is explained in this document:

Documentation - Backing Up And Restoring Your Nagios xi System

As mentioned before, the most common cause of failing backups is a corrupt database. Here is an example of a failed backup due to a corrupt database:

Running configuration check...
Stopping nagios: done.
Starting nagios: done.
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
Backing up Nagios xi...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 130: Incorrect file format 'nagios_flappinghistory' when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!

 

The error "check the password in this script" is a generic message and is not the cause, the line before it explains the issue in this example.

Please follow this article to repair the database:

Documentation - Crashed Database Tables

 

Once the database has been repaired, run a manual backup to confirm that the issue has been resolved.

 

To remove the directories of failed backup files, execute the following command (this will not touch any .tar.gz files):

find /store/backups/nagiosxi/ -mindepth 1 -maxdepth 1 -type d -exec rm -rf '{}' \;

 

Watching Scheduled Backups

If you need to see what is actually occurring when the scheduled backup is run, you can watch the output live by executing the following command:

tail /usr/local/nagiosxi/var/cmdsubsys.log -f

Press CTRL + C when you have finished.

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
NRPE - Agent and Plugin Explained
Viewed 68775 times since Fri, Jul 14, 2017
Nagios xi - Running Out Of Disk Space On The Nagios xi VM
Viewed 23974 times since Tue, Jan 27, 2015
Nagios xi - Scheduled Downtime Not Working
Viewed 7959 times since Mon, Oct 10, 2016
Nagios xi - HTTP 500 Error / PHP Parse error - Unexpected $end
Viewed 7002 times since Mon, Jan 25, 2016
Nagios xi - Moving Your xi Installation
Viewed 4384 times since Tue, Jul 18, 2017
Nagios xi - Upgrade errors - root.crontab.orig: cannot overwrite existing file
Viewed 4765 times since Tue, Jan 26, 2016
Nagios xi - Defining Global Environment Variables
Viewed 10874 times since Thu, Mar 17, 2016
Nagios xi - Problems With Scheduled Backups At Midnight
Viewed 4959 times since Mon, Oct 10, 2016
Nagios xi - Last Check Time Not Updating
Viewed 20702 times since Tue, Jan 6, 2015
Nagios xi - Uploaded plugin returns "/bin/bash^M: bad interpreter: No such file or directory"
Viewed 7413 times since Thu, Feb 25, 2016