Page 1 of 1

Local backups to nfs share not working

Posted: Fri Jan 27, 2017 1:51 pm
by yeahMon
Hey;

I am unable to get scheduled local backups to appear in a mounted nfs directory. They do appear OK in a local directory on the nagios server.
But when change that directory to a different dir thats an nfs cluster share, no backups.

- Running nagiosxi 5.2.0
-The 'test permissions' button says directory exists and is writeable. nagios user can touch a file in the nfs directory.
- Heres the /usr/local/nagiosxi/var/components/scheduledbackups.log:
01-27-2017 11:45:02 DEBUG: Running scheduled local backup ...
01-27-2017 11:45:02 INFO: Creating a local backup: nagiosxi.1485535502
01-27-2017 11:45:02 DEBUG: Sending create local backup command to CmdSubsystem


- If i run the backup script manually and specify my nfs directory it works fine: ./backup_xi.sh -d /mybackups

Please let me know if theres something else i can check.
Thanks.

Re: Local backups to nfs share not working

Posted: Fri Jan 27, 2017 1:55 pm
by ssax
Please send the output of these commands:

Code: Select all

ls -ld /mybackups
ls -l /mybackups
Thank you

Re: Local backups to nfs share not working

Posted: Fri Jan 27, 2017 2:26 pm
by yeahMon
ssax;

ls -ld /mybackups
drwxrwxrwx 3 root root 4096 Jan 27 14:04 /mybackups

ls -l /mybackups
drwx------ 2 root root 16384 Jan 26 10:53 lost+found
-rw-rw-r-- 1 nagios nagios 0 Jan 27 08:44 test

I saw right away the directory was owned by root. I changed ownership to nagios and it now works.
I didn't check this, as nagios user was able to write a test file. I guess somewhere the ownership is checked, even though the directory is writeable by all.

I winder why didn't the 'test permissions' button pick this up?

Re: Local backups to nfs share not working

Posted: Fri Jan 27, 2017 3:12 pm
by ssax
You're running an older version, there have been a few bug fixed in the backup functionality since then, can you try upgrading and see if you're able to replicate the issue? I wasn't able to.

Re: Local backups to nfs share not working

Posted: Fri Jan 27, 2017 3:42 pm
by yeahMon
Before i upgrade, i was planning to install nagios on a 30 day trial on another machine, and test the restore.
When i'm confident that the restore works for me, i'll go ahead and upgrade. That may take awhile. If you want, you can close this, and i will raise the issue again if i can replicate it.

Thanks again.