Nagios Scheduled Backup Directory

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Nagios Scheduled Backup Directory

Post by amit.ahuja »

Hi,

I would like to make Nagios to send its backup daily to another host by using Scheduled Backup configuration. However, I changed the directory, where to store the backup files, in the backup_xi.sh script. Since Nagios always look into /store/backups/nagiosxi to pull out the backup, the file could not be transferred successfully. Is there a way changing some configs so that Scheduled Backup will look up another directory?

Thanks.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios Scheduled Backup Directory

Post by gormank »

Change the dir back to the original value.
Then go to admin, scheduled baclups and define a backup. There you can define the remote dir.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Nagios Scheduled Backup Directory

Post by bwallace »

Thanks again gormank. OP, let us know the outcome.
Be sure to check out the Knowledgebase for helpful articles and solutions!
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios Scheduled Backup Directory

Post by amit.ahuja »

Thank you, gormank. But, I am looking for a way to change the path where Scheduled Backup looks for the backup files, not using the default path.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios Scheduled Backup Directory

Post by gormank »

Scheduled backup doesn't look for a backup file, it creates a backup and transfers it to the remote host placing it in the remote dir you specify.
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios Scheduled Backup Directory

Post by amit.ahuja »

Based on my observation, it does not seem so. Let me explain my situation in detail. The backup_xi.sh creates the backup and put it into /store/backups/nagiosxi/. What I did was that I changed the path from /store/backups/nagiosxi/ to /www/backups/nagiosxi/, because of storage capacity concern. Next, I set up a Scheduled Backup from Nagiosxi GUI. After the scheduled time was hit, it showed the backup was created, and I found it in the directory /www/backups/nagiosxi/. However, I could not find the file in the destination directory, which meant that the file was not transferred. But, after I change the path back to /store/backups/nagiosxi/, everything worked fine. So, my thought is that if I change the path, Nagios creates the file in /www/backups/nagiosxi/, but looks for the file in /store/backups/nagiosxi/ for transfer. I could be wrong. Thank you very much for your help, gormank.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios Scheduled Backup Directory

Post by gormank »

Sorry, I thought the 2 backups were separate.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios Scheduled Backup Directory

Post by hsmith »

What are the permissions on both directories?
Former Nagios Employee.
me.
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios Scheduled Backup Directory

Post by amit.ahuja »

store drwxr-xr-x
store/backups drwxr-xr-x
store/backups/nagiosxi drwxr-xr-x

www drwxrwxrwx
www/backups drwxr-xr-x
www/backups/nagiosxi drwxr-xr-x
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios Scheduled Backup Directory

Post by rkennedy »

Your paragraph painted a very good picture! It sounds like the file was created, but not moved. Possibly because of either permissions, or the script didn't know where to look.

I see the R flag there, but who owns those folders though? Can you run a ls -l on them as well?

The script may have not known where to pull the file from since you changed the initial directory, can you show us where you changed it so we can review the code?
Former Nagios Employee
Locked