Page 1 of 1

SSH Backup issue

Posted: Mon Oct 15, 2018 1:27 pm
by vignesha
Hi,

We have tested the SSH back on 11th OCT before scheduled a SSH Backup we have tested the Connection and test SCP transfer every this working fine but backup haven't transferred to destination server, when we checked the
/usr/local/nagiosxi/var/components/scheduledbackups.log
Error backing up MySQL database 'nagios' - check the password in this script!
10-11-2018 11:42:37 ERROR: Scheduled SSH Backup Failed: Could not authenticate on SSH server

We have tried to login as nagios user to sql its working PFB output
[root@xxxxxxx ~]# su - nagios
[nagios@xxxxxxxxx ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1245189
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> Bye
[nagios@xxxxxxxxxxx ~]$ mysql -u nagiosql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1245241
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> Bye

So kindly review this problem and provide your assist

Re: SSH Backup issue

Posted: Mon Oct 15, 2018 2:34 pm
by scottwilkerson
In your config.inc.php let's change line 37 from this

Code: Select all

"dbserver" => '',
to this

Code: Select all

"dbserver" => 'localhost',
I believe that will resolve the issue.

Re: SSH Backup issue

Posted: Wed Oct 17, 2018 6:35 am
by vignesha
scottwilkerson wrote:In your config.inc.php let's change line 37 from this

Code: Select all

"dbserver" => '',
to this

Code: Select all

"dbserver" => 'localhost',
I believe that will resolve the issue.
Hi,

We have modified to "dbserver" => 'localhost', and we have tested SSH backup still we are getting the below error.

10-17-2018 09:10:07 ERROR: Scheduled SSH Backup Failed: Local file to transfer does not exist
10-17-2018 09:11:30 ERROR: Scheduled SSH Backup Failed: Local file to transfer does not exist

Re: SSH Backup issue

Posted: Wed Oct 17, 2018 7:12 am
by scottwilkerson
What version of Nagios XI are you running?

Re: SSH Backup issue

Posted: Thu Oct 18, 2018 1:39 am
by vignesha
scottwilkerson wrote:What version of Nagios XI are you running?
Hi Scottwilkerson,

We are running on Nagios XI 5.4.10 version.

Re: SSH Backup issue

Posted: Thu Oct 18, 2018 1:57 pm
by lmiltchev
Can you run the following command on the Nagios XI server and show the output?

Code: Select all

ls -la /store/backups/nagiosxi
Also, do the following:

1. Start a running tail on the cmdsubsys.log:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
2. Log into the Nagios XI web interface, go to Admin > System Backups > Scheduled Backups > SSH, and schedule a backup to run in a few minutes.

3. Go back to the SSH (putty) terminal, and watch the tail command. Wait until the backup if finished (with success or failure), stop the tail (ctrl+c), copy and paste the output on the forum.