Nagios Backup

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Upatel
Posts: 21
Joined: Thu Jan 10, 2013 3:07 pm

Nagios Backup

Post by Upatel »

Hi There,

How to change the time for postgres and mysql Nagios db backup daily/weekly/monthly ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios Backup

Post by abrist »

The backups are handled by cron:

Code: Select all

cat /etc/cron.d/nagiosxi
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Upatel
Posts: 21
Joined: Thu Jan 10, 2013 3:07 pm

Re: Nagios Backup

Post by Upatel »

So different places for daily, weekly and monthly backup. We would like change the default time for all this backups.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios Backup

Post by abrist »

What times would you like?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Upatel
Posts: 21
Joined: Thu Jan 10, 2013 3:07 pm

Re: Nagios Backup

Post by Upatel »

for postgres 4 AM and mysql 5 AM
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Backup

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked