MySQL Backup Size/Disable MySQL Backups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
wneville
Posts: 113
Joined: Wed Mar 31, 2021 3:35 pm

MySQL Backup Size/Disable MySQL Backups

Post by wneville »

Hello,

Recently the daily mysql backups have gotten extremely large and I am not sure how to resolve it other than to disable them. Is that safe to do if I am running a daily local backup within NagiosXI? My most recent daily mysql backup is over 4GB and with this happening daily I can't allow it to continue. This hasn't been an issue until recently so not sure what happened.

I also noticed that /var/data/mysql has grown quite a bit. Is there any way to decrease the amount of space these files are using?:

Code: Select all

mysql]# pwd
/var/data/mysql

mysql]# du -all --human-readable --one-file-system --max-depth=4 | sort -k1 -rh |  head -n 20
25G     .
14G     ./nagios
11G     ./nagiosxi
9.9G    ./nagiosxi/xi_meta.ibd
5.4G    ./nagios/nagios_eventhandlers.MYD
2.9G    ./nagios/nagios_statehistory.MYD
2.4G    ./nagios/nagios_logentries.MYD
976M    ./nagios/nagios_logentries.MYI

Any help is appreciated. I would also love to know the root cause for the sudden increase in the size of the mysql backups but priority right now is shutting them off if that is safe to do. The Database Maintenance light in the System Status dashlet is red but I have run the repair_databases.sh script a few times now and it always completes very quickly.

I am running NagiosXI 2024R1.3.3 on RHEL 8

Thank you!
User avatar
jmichaelson
Posts: 383
Joined: Wed Aug 23, 2023 1:02 pm

Re: MySQL Backup Size/Disable MySQL Backups

Post by jmichaelson »

Database backup size is naturally a function of the size of the database. The MySQL databases use mysqldump for the backup. which produces a lot of redundant text text; you've got nearly 10GB in xi_meta.ibd, and 11.6 GB in the nagios directory. 4GB doesn't seem unreasonable for a backup of that much data.

My initial suspicion is that you've got a database maintenance job that isn't running correctly to clean these up.
Please let us know if you have any other questions or concerns.

-Jason
wneville
Posts: 113
Joined: Wed Mar 31, 2021 3:35 pm

Re: MySQL Backup Size/Disable MySQL Backups

Post by wneville »

Are there recommended steps outside of running the repair_databases.sh script?
Post Reply