Page 1 of 1

Nagios XI Backup

Posted: Mon May 11, 2015 1:51 pm
by gzarif
Hi,

How do I do a scheduled backup?

I think the only way I can is the Local backup but i always get The directory is likely not writeable by user 'nagios' or group 'nagios' - check permissions

Please advise.

Thanks,

G.

Re: Nagios XI Backup

Posted: Mon May 11, 2015 2:17 pm
by jolson
It sounds like you're already this far, but you can specify local backups (in addition to SSH or FTP backups) at the following page:
2015-05-11 14_09_57-Nagios XI - Administration.png
If you hit test permissions and you're getting a permissions problem, that means that the directory you've selected for backups is probably not read/write-able by the 'nagios' user. To test this, log into the nagios device using SSH or similar, and run the following command:

Code: Select all

ls -l <backup directory here>
For example, if I chose /nagiosbackups/backups as my directory of choice, I would run:

Code: Select all

ls -l -d /nagiosbackups/backups
This will give us a list of permissions for that directory.
ls -l -d /nagiosbackups/backups
drwxr-xr-x 2 root root 4096 May 11 15:12 /nagiosbackups/backups
Note that drwxr-xr-x are the read-write permissions, and root root is the owner/group.

You will want this directory to be owned by nagios/nagios, and the nagios user needs proper permissions. Following my example, we'll change the directory permissions with the following command:

Code: Select all

chmod u+rw /nagiosbackups/backup
chmod g+rw /nagiosbackups/backup
chown nagios:nagios /nagiosbackups/backup
Let's check the permissions now...
ls -ld /nagiosbackups/backups/
drwxrwxr-x 2 nagios nagios 4096 May 11 15:12 /nagiosbackups/backups/
Looks good - run 'test permissions' once more and you should see it pass successfully.