Page 1 of 2

Nagios XI backup size increasing

Posted: Wed Nov 26, 2025 9:21 am
by Sandip2705
Hello,

We have installed Nagios XI server & which is having scheduled backup running on daily basis. The backup size keeps on increasing by the new logs, alerts, notifications, is there any way to decrease the size of the backup with minimum required logs or is there any way to take the config backup only? What is the best approach in this situation?

Regards,

Sandip

Re: Nagios XI backup size increasing

Posted: Mon Dec 01, 2025 10:34 am
by cdietsch
Hello @Sandip2705,

This is just the nature of backups. The system backup in the web interface does the following:
Backup Overview
The backup script will save a copy of the following components of Nagios XI:
• Nagios Core files (/usr/local/nagios/)
• Nagios XI files (/usr/local/nagiosxi/)
• MRTG files (/var/lib/mrtg/ and /etc/mrtg/)
• NRDP files (/usr/local/nrdp/)NagVis files (/usr/local/nagvis/)
• CRON files (in /var/spool/cron/apache)
• Apache config files (in /etc/httpd/conf.d/)
• logrotate config files (in /etc/logrotate.d/)
• MySQL databases (nagios, nagiosql, nagiosxi)
The backup script will save backups in the /store/backups/nagiosxi/ directory. Backup names
correspond to the Unix timestamp at the time the backups were created, for example
1479858002.tar.gz.
Here is the document I got this info from that has some more backup reference material: https://assets.nagios.com/downloads/nag ... I-2024.pdf

You can always store the backups on another system through FTP or SSH. You could also write your own custom backup script and just schedule that in cron.

Re: Nagios XI backup size increasing

Posted: Tue Dec 02, 2025 8:08 pm
by Gladyobbss
You could try creating a custom backup script that only includes config files and exclude logs or database dumps if not needed. This helped me control backup size better.

Re: Nagios XI backup size increasing

Posted: Wed Dec 03, 2025 9:16 am
by Sandip2705
Hello,

Is there any way to take bare minimum config backup? because i saw some blogs online & it was like we can take minimum config backup but i was just taking confirmation that is it possible to take that config backup.

Regards,

Sandip

Re: Nagios XI backup size increasing

Posted: Wed Dec 03, 2025 11:29 am
by cdietsch
Hi @Sandip2705,

The system backup in Nagios XI only does a full backup.

The only way to change the backup settings would be to modify the system backup script or write a custom backup script as @Gladyobbss suggested.

A good way to create a custom backup script would probably be to copy and modify

Code: Select all

/usr/local/nagiosxi/scripts/backup_xi.sh
You can run this script from the command line to create backups and test your changes.

Re: Nagios XI backup size increasing

Posted: Thu Dec 18, 2025 9:24 am
by Sandip2705
Hello,

Can you provide any document to create this custom script? That way i can try & create one for my our environment.


Regards,

Sandip Khedekar

Re: Nagios XI backup size increasing

Posted: Thu Dec 18, 2025 9:41 am
by Sandip2705
Hello,

I have managed to get the custom script "remove_historical_data.sh" but it gives me below error when i try to execute it.

ERROR 1142 (42000) at line 1: DROP command denied to user 'dbmaint_nagiosxi'@'localhost' for table 'xi_auditlog'
Error truncating table 'xi_auditlog' in MySQL database 'nagiosxi'

Regards,

Sandip Khedekar

Re: Nagios XI backup size increasing

Posted: Fri Dec 19, 2025 10:39 am
by cdietsch
Hi @Sandip2705 ,

The script /usr/local/nagiosxi/scripts/remove_historical_data.sh that comes with XI is not a backup script. The correct location of the backup script to copy/modify would be /usr/local/nagiosxi/scripts/backup_xi.sh.

I do however, see the the error you mentioned when running the remove_historical_data.sh script. I can't promise any timeline for the release of the fix, but when it is fixed, there will be a corresponding line in the Changelog with the tag [GL:XI#2317].

I highly recommend opening a case with the support department to see if they would be able to work with you to get a custom backup script that works with what you are trying to do.

Good luck!

Re: Nagios XI backup size increasing

Posted: Fri Dec 19, 2025 3:09 pm
by browan
Howdy @sandip2705 :
I notice you may not need to run the script anymore based on the context of the conversation, however just in case you need it, the remove_historical_data script fails due to invalid permissions for the mysql user. In order to fix this, as the admin mysql user the script that I have attached should be run.
grant_drop_permission.sql
Please let me know if this does not work!

Thank you for your patience!
Ben Rowan

Re: Nagios XI backup size increasing

Posted: Fri Feb 13, 2026 9:04 am
by Sandip2705
Hello,

Apologies for the delay in response. Please close this as issue has been resolved.

Regards,

Sandip