Page 2 of 2
Re: Local Backup Archives - backup not showing
Posted: Wed Sep 18, 2019 6:45 am
by dbcummings
Or perhaps the directory references in cmdsubsys.php.
Re: Local Backup Archives - backup not showing
Posted: Wed Sep 18, 2019 10:47 am
by mbellerue
I'm going back to look at some of the previous information you've given us. I noticed this.
Code: Select all
drwxr-xr-x. 2 11963 1465 31 Sep 16 09:34 /store/backups/nagiosxi
-rw-r--r-- 1 nagios nagios 370145543 Sep 16 09:34 1568640739.tar.gz
So the /store/backups/nagiosxi directory's permissions are incorrect, but Nagios is able to verify the ability to write to the backup location, and can create a backup there. It just can't list the backup in Local Backup Archives.
I've done this with an NFS setup on my side. I can't verify that the directory is writeable, I can't create backups, but I can see any existing backups in Local Backup Archives. I'm getting the exact opposite of what you're getting.
Let's quick verify that your Apache user is part of the nagios group.
And let's also do this. Run this command, let it run while you navigate or refresh the Local Backup Archives page.
Code: Select all
tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_log
I am also getting these messages in /usr/local/nagiosxi/var/components/scheduledbackups.log when trying to run overnight backups.
09-17-2019 00:11:55 ERROR: Scheduled SSH Backup Failed: Local file to transfer does not exist
This, I don't think we need to worry about. We're just working with local backups, and this is an SSH backup issue. Definitely worth investigating, but isn't what we're looking at here.
Re: Local Backup Archives - backup not showing
Posted: Wed Sep 18, 2019 11:24 am
by dbcummings
I will PM you the info. Also, we are working toward doing SSH remote backups. So, I think it is related. It can't see the file it has created.
Re: Local Backup Archives - backup not showing
Posted: Wed Sep 18, 2019 11:50 am
by mbellerue
Actually, you could very well be right. The SSH backup first makes a local backup, as you'd expect, and then it transfers the local backup. I was under the impression that you were able to create backups locally, they just weren't showing in Local Backup Archives. But if I look at the output you gave previously, the backup that we see in /store/backups/nagiosxi is actually a different file from the file shown in the command subsystem log.
Do you have the ability to change the permissions on /store/backups/nagiosxi? Right now the permissions do not line up with any user credentials on your XI system. If that could be owned by nagios:nagios, that would be best.
Code: Select all
chown nagios:nagios /store/backups/nagiosxi
Re: Local Backup Archives - backup not showing
Posted: Wed Sep 18, 2019 12:33 pm
by dbcummings
Thanks. I made this change since my original post. But, I went ahead and repeated the chown command for good measure. Same problem. Here are the current permissions.
[root@nagios-itms-cl01 nagiosxi]# ls -alFh /store/backups/nagiosxi
total 443M
drwxr-xr-x 2 nagios nagios 31 Sep 18 13:30 ./
drwxr-xr-x. 4 root root 35 Sep 18 07:24 ../
-rw-r--r-- 1 nagios nagios 443M Sep 18 13:30 1568827694.tar.gz
FYI. I have one production server out of 8 where this works. The difference between it and the others is that it was deployed on an older version, the directories were moved at a later date, and then it was upgraded to 5.6.6. Weird.
DB
Re: Local Backup Archives - backup not showing
Posted: Wed Sep 18, 2019 12:44 pm
by dbcummings
Ok. May have solved my problem. I had to a chmod 755 at the /data/store level. That worked. I am going to test the scheduled backups and see if that corrects the problem as well.
Re: Local Backup Archives - backup not showing
Posted: Wed Sep 18, 2019 2:12 pm
by mbellerue
Okay, we'll keep this open until we hear back.
Re: Local Backup Archives - backup not showing
Posted: Thu Sep 19, 2019 8:01 am
by dbcummings
Ok. The problem is corrected for local and scheduled backups. This is solved.
Re: Local Backup Archives - backup not showing
Posted: Thu Sep 19, 2019 8:04 am
by dbcummings
One additional note. You might want to look at the permission settings that are created on the /store/backups directory during install. I didn't create that directory. It was created automatically. So, somewhere 755 needs to be used to create the folder with the correct permissions.
Re: Local Backup Archives - backup not showing
Posted: Thu Sep 19, 2019 11:04 am
by mbellerue
Okay, thank you for the heads up. I will test that out, and see if I can replicate it. Closing thread.