Page 1 of 1

Nagios Backup

Posted: Mon Jan 27, 2014 3:05 pm
by Upatel
Hi There,

How to change the time for postgres and mysql Nagios db backup daily/weekly/monthly ?

Re: Nagios Backup

Posted: Mon Jan 27, 2014 3:41 pm
by abrist
The backups are handled by cron:

Code: Select all

cat /etc/cron.d/nagiosxi

Re: Nagios Backup

Posted: Mon Jan 27, 2014 4:15 pm
by Upatel
So different places for daily, weekly and monthly backup. We would like change the default time for all this backups.

Re: Nagios Backup

Posted: Mon Jan 27, 2014 4:18 pm
by abrist
What times would you like?

Re: Nagios Backup

Posted: Tue Jan 28, 2014 11:18 am
by Upatel
for postgres 4 AM and mysql 5 AM

Re: Nagios Backup

Posted: Tue Jan 28, 2014 12:16 pm
by lmiltchev
You need to have the following lines in the "/etc/cron.d/nagiosxi".:

Code: Select all

# Backup MySQL & PostgreSQL Databases
0   5 * * * root   /root/scripts/automysqlbackup
0   4 * * * root   /root/scripts/autopostgresqlbackup
Save, and exit.

The backup will run daily. The backups are then rotated weekly & monthly. Hope this helps.