Backup component

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Backup component

Post by morabanc »

I'm testing the backup component, when I try to create a backup nothing happens, this error is appearing in error_log from apache:

PHP Warning: filesize(): stat failed for Error backing up MySQL database 'nagios' - check the password in this script! in /usr/local/nagiosxi/html/includes/components/scheduledbackups/scheduledbackups.inc.php on line 516

I can't check if the password is correct or not, because php file is protected with source guardian.

If I launch the backup script backup_xi.sh it works fine.

Thanks.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Backup component

Post by jdalrymple »

The auth info ultimately comes from /usr/local/nagiosxi/html/config.inc.php, but it comes there for backup_xi.sh also I'm pretty sure.

Did you change your auth parameters for either of the databases?
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Backup component

Post by morabanc »

No, we are using default password
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Backup component

Post by lmiltchev »

Can you run the following command and show the output?

Code: Select all

grep pwd /usr/local/nagiosxi/html/config.inc.php
Be sure to check out our Knowledgebase for helpful articles and solutions!
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Backup component

Post by morabanc »

Hello,

Here the output:

grep pwd /usr/local/nagiosxi/html/config.inc.php
"pwd" => 'n@gweb',
"pwd" => 'n@gweb',
"pwd" => 'n@gweb',
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Backup component

Post by jolson »

If I launch the backup script backup_xi.sh it works fine.
This is the interesting part to me. What version of XI are you running?

Check users and groups:

Code: Select all

grep nag /etc/passwd
grep nag /etc/group
Check sudoers:

Code: Select all

cat /etc/sudoers
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Backup component

Post by morabanc »

Hi,

I solved it! It was a permissions problem, realated with the own of /store/backups/nagiosxi/ directory, the owner should be nagios, and it was configured with root, after to change this it has worked.

Thanks for your suppport.
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Backup component

Post by hsmith »

Is there anything else we can do to help you out with this particular issue, or are we all right to mark this one resolved and close it up?
Former Nagios Employee.
me.
Locked