Page 1 of 1

Nagios XI SQL back ups taking up gigs of data

Posted: Wed Jun 24, 2015 1:19 pm
by JakeHatMacys
I've got Daily SQL back ups taking up a ton of space on '/' directory and we'd like to move them to a Network mount we put on the server...

Not seeing anyway to do this in the UI and googling gave me too much back up and restore articles to find anything useful. Is there an easy way to move the daily, monthly & weekly SQL back ups to this different mount???

Code: Select all

$ du -csh daily
4.6G    daily
4.6G    total
$ cd daily
$ ls
mysql  nagios  nagiosql  test
$ cd nagios
$ ls
nagios_2015-06-14_07h00m.Sunday.sql       nagios_2015-06-19_07h00m.Friday.sql.gz
nagios_2015-06-15_07h00m.Monday.sql       nagios_2015-06-21_07h00m.Sunday.sql.gz
nagios_2015-06-16_07h00m.Tuesday.sql      nagios_2015-06-22_07h00m.Monday.sql.gz
nagios_2015-06-17_07h00m.Wednesday.sql    nagios_2015-06-23_07h00m.Tuesday.sql.gz
nagios_2015-06-18_07h00m.Thursday.sql.gz  nagios_2015-06-24_07h00m.Wednesday.sql.gz
I'd like to have these moved to:

/nagios_backups/MySQL/daily etc

Going forward instead of where they are currently:

/store/backups/MySQL/daily etc

Re: Nagios XI SQL back ups taking up gigs of data

Posted: Wed Jun 24, 2015 1:22 pm
by tmcdonald
Admin -> Scheduled Backups -> "Local" tab

You can put in any valid file path, so if it's a network mount it will work just fine. There are also FTP and SSH tabs.

Re: Nagios XI SQL back ups taking up gigs of data

Posted: Wed Jun 24, 2015 1:33 pm
by JakeHatMacys
tmcdonald wrote:Admin -> Scheduled Backups -> "Local" tab

You can put in any valid file path, so if it's a network mount it will work just fine. There are also FTP and SSH tabs.
That doesn't change anything for the daily SQL back ups though does it? I'm asking cause I have local back ups turned off atm and it's still backing up the SQL db daily.

I was also hoping to avoid using that since this box is still on 2014 2.5 and there's a bug where it fills up '/' when using that. It was explained to me that it was backing up the back ups last time when I was hit with the bug.

Re: Nagios XI SQL back ups taking up gigs of data

Posted: Wed Jun 24, 2015 2:07 pm
by abrist
Nagios XI systems perform two types of backups. The first is the full XI system backup (the one configurable in the UI). The other is strictly SQL backups and they are performed by a cron:

Code: Select all

$ grep sql /etc/cron.d/nagiosxi
0   7 * * * root   /root/scripts/automysqlbackup
0   8 * * * root   /root/scripts/autopostgresqlbackup
If you really want to disable these backups, comment them out in the /etc/cron.d/nagiosxi file:

Code: Select all

# Backup MySQL & PostgreSQL Databases
# 0   7 * * * root   /root/scripts/automysqlbackup
# 0   8 * * * root   /root/scripts/autopostgresqlbackup
[snip]

Re: Nagios XI SQL back ups taking up gigs of data

Posted: Wed Jun 24, 2015 2:19 pm
by JakeHatMacys
abrist wrote:Nagios XI systems perform two types of backups. The first is the full XI system backup (the one configurable in the UI). The other is strictly SQl backups and they are performed by a cron:

Code: Select all

$ grep sql /etc/cron.d/nagiosxi
0   7 * * * root   /root/scripts/automysqlbackup
0   8 * * * root   /root/scripts/autopostgresqlbackup
If you really want to disable these backups, comment them out in the /etc/cron.d/nagiosxi file:

Code: Select all

# Backup MySQL & PostgreSQL Databases
# 0   7 * * * root   /root/scripts/automysqlbackup
# 0   8 * * * root   /root/scripts/autopostgresqlbackup
[snip]
I think I'd just prefer the cron.d file moves the SQL back ups to the network mount... I'll look at getting that done thanks for pointing me to that cron.

Re: Nagios XI SQL back ups taking up gigs of data

Posted: Wed Jun 24, 2015 2:24 pm
by abrist
No problem, let us know if you have further issues.
Cheers!