Page 1 of 2
Nagios Scheduled Backup Directory
Posted: Tue Mar 15, 2016 9:06 am
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.
Re: Nagios Scheduled Backup Directory
Posted: Tue Mar 15, 2016 10:24 am
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.
Re: Nagios Scheduled Backup Directory
Posted: Tue Mar 15, 2016 10:39 am
by bwallace
Thanks again gormank. OP, let us know the outcome.
Re: Nagios Scheduled Backup Directory
Posted: Tue Mar 15, 2016 12:26 pm
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.
Re: Nagios Scheduled Backup Directory
Posted: Tue Mar 15, 2016 1:53 pm
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.
Re: Nagios Scheduled Backup Directory
Posted: Tue Mar 15, 2016 2:34 pm
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.
Re: Nagios Scheduled Backup Directory
Posted: Tue Mar 15, 2016 2:54 pm
by gormank
Sorry, I thought the 2 backups were separate.
Re: Nagios Scheduled Backup Directory
Posted: Tue Mar 15, 2016 4:17 pm
by hsmith
What are the permissions on both directories?
Re: Nagios Scheduled Backup Directory
Posted: Thu Mar 17, 2016 8:27 am
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
Re: Nagios Scheduled Backup Directory
Posted: Thu Mar 17, 2016 1:25 pm
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?