SSH Scheduled Backups
Re: SSH Scheduled Backups
need to do it again, that day we happened to run out space.
my problem is that the zip file is not getting copied to the remote server. the backup finish completely and you can tell because the zip file is created successfully. in the example provided, that doesn't happens
my problem is that the zip file is not getting copied to the remote server. the backup finish completely and you can tell because the zip file is created successfully. in the example provided, that doesn't happens
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: SSH Scheduled Backups
Yes I can see a couple of things going on.
I noticed these errors in the log you PM'd me:
I'm going to follow up with the USA techs on this one. Regardless, I know this is not the cause of your issue but it needs to be resolved none the less.
What version of Nagios XI do you have?
I would also like you to attempt to copy the file vi SSH at the command line:
I want to see if it succeeds at the command line.
I noticed these errors in the log you PM'd me:
Code: Select all
Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.
ERROR CONNECTING TO DATABASES!
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: connection limit exceeded for non-superusers in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682What version of Nagios XI do you have?
I would also like you to attempt to copy the file vi SSH at the command line:
Code: Select all
su nagios
xxx command to copy /store/backups/nagiosxi/backupfile.tar.gz to SSH destinationAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: SSH Scheduled Backups
How many people do you have logged in at once? The pg_connect errors about connection limits exceeded is usually an easy fix, but typically only seen when many people are logged in at once or when many reports are being run:
http://stackoverflow.com/questions/1358 ... superusers
Also, do you have any checks being run against the Nagios postgres database for performance or anything? This would also add to the number of connections.
http://stackoverflow.com/questions/1358 ... superusers
Also, do you have any checks being run against the Nagios postgres database for performance or anything? This would also add to the number of connections.
Former Nagios employee
Re: SSH Scheduled Backups
Box293
here is the result
# su - nagios
[nagios@nagmonus1 ~]$ cd /store/
[nagios@nagmonus1 store]$ cd backups/
[nagios@nagmonus1 backups]$ cd nagiosxi/
[nagios@nagmonus1 nagiosxi]$ scp nagiosxi.1446430802.tar.gz nagmondb1:/store/backups/nagiosxi
scp: /store/backups/nagiosxi/nagiosxi.1446430802.tar.gz: Permission denied
but, this should not matter because when I schedule the JOB, I configured as root
lastly, my DB seems to be in a good state
# /usr/local/nagiosxi/scripts/box293_check_mysql_table_status nagios nagiosxi
Database "nagios" = All OK
You have mail in /var/spool/mail/root
root@nagmondb1:(11-02 17:01): /
# /usr/local/nagiosxi/scripts/box293_check_mysql_table_status nagiosql nagiosxi
Database "nagiosql" = All OK
here is the result
# su - nagios
[nagios@nagmonus1 ~]$ cd /store/
[nagios@nagmonus1 store]$ cd backups/
[nagios@nagmonus1 backups]$ cd nagiosxi/
[nagios@nagmonus1 nagiosxi]$ scp nagiosxi.1446430802.tar.gz nagmondb1:/store/backups/nagiosxi
scp: /store/backups/nagiosxi/nagiosxi.1446430802.tar.gz: Permission denied
but, this should not matter because when I schedule the JOB, I configured as root
lastly, my DB seems to be in a good state
# /usr/local/nagiosxi/scripts/box293_check_mysql_table_status nagios nagiosxi
Database "nagios" = All OK
You have mail in /var/spool/mail/root
root@nagmondb1:(11-02 17:01): /
# /usr/local/nagiosxi/scripts/box293_check_mysql_table_status nagiosql nagiosxi
Database "nagiosql" = All OK
You do not have the required permissions to view the files attached to this post.
Re: SSH Scheduled Backups
Hi tmcdonald
We have about ten different stations that have different dashboards
I do have checks being run agains the postgress db
We have about ten different stations that have different dashboards
I do have checks being run agains the postgress db
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: SSH Scheduled Backups
OK so the cron job itself runs as the nagios user, lets try making sure we also define the root username:bosecorp wrote:# su - nagios
[nagios@nagmonus1 ~]$ cd /store/
[nagios@nagmonus1 store]$ cd backups/
[nagios@nagmonus1 backups]$ cd nagiosxi/
[nagios@nagmonus1 nagiosxi]$ scp nagiosxi.1446430802.tar.gz nagmondb1:/store/backups/nagiosxi
scp: /store/backups/nagiosxi/nagiosxi.1446430802.tar.gz: Permission denied
but, this should not matter because when I schedule the JOB, I configured as root
Code: Select all
su - nagios
cd /store/backups/nagiosxi/
scp nagiosxi.1446430802.tar.gz root@nagmondb1:/store/backups/nagiosxiAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: SSH Scheduled Backups
it works, after typing the password
root@nagmonus1:(11-03 19:19): /root/.ssh
# su - nagios
[nagios@nagmonus1 ~]$ cd /store/backups/nagiosxi/
[nagios@nagmonus1 nagiosxi]$ scp nagiosxi.1446430802.tar.gz root@nagmondb1:/store/backups/nagiosxi
root@nagmondb1's password:
nagiosxi.1446430802.tar.gz 100% 7826MB 49.9MB/s 02:37
You have new mail in /var/spool/mail/nagios
[nagios@nagmonus1 nagiosxi]$
root@nagmonus1:(11-03 19:19): /root/.ssh
# su - nagios
[nagios@nagmonus1 ~]$ cd /store/backups/nagiosxi/
[nagios@nagmonus1 nagiosxi]$ scp nagiosxi.1446430802.tar.gz root@nagmondb1:/store/backups/nagiosxi
root@nagmondb1's password:
nagiosxi.1446430802.tar.gz 100% 7826MB 49.9MB/s 02:37
You have new mail in /var/spool/mail/nagios
[nagios@nagmonus1 nagiosxi]$
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: SSH Scheduled Backups
OK so thats a good thing.
I'm going to talk to the USA techs about what troubleshooting steps we can follow next.
I'm going to talk to the USA techs about what troubleshooting steps we can follow next.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: SSH Scheduled Backups
What version of XI are you using?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: SSH Scheduled Backups
Installed Version: 2014R1.5