Page 1 of 4
SSH Scheduled Backups
Posted: Sun Oct 11, 2015 3:11 pm
by bosecorp
I tried setup SSH backups. the overall backup complete successfully. however the file is stored in XI Server instead of the SSH remote server. I performed the SSH test connection as well as the test scp prior running the backup
Re: SSH Scheduled Backups
Posted: Mon Oct 12, 2015 12:36 am
by Box293
When the backup occurs, it creates the backup locally first and then copies it across to the SSH server.
Do the files ever make it to the SSH server?
What version of XI are you using?
Can you run this command in an SSH session on your XI server:
Code: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
Now go into scheduled backups and schedule one for a couple of minutes in the future.
Watch the SSH session and please report back what is output on the screen.
Re: SSH Scheduled Backups
Posted: Sun Oct 18, 2015 6:47 pm
by bosecorp
Backups take hours to complete. I have a big environment. I can't seat all night and watch it
is there an easier way to troubleshoot this
Re: SSH Scheduled Backups
Posted: Sun Oct 18, 2015 7:03 pm
by jdalrymple
Hi bosecorp,
Did you modify the scheduled backup component at all? I think the way it works is as follows:
Kick off a backup...
Wait awhile (25 minutes by default) looking for the completed backup tar.gz every few minutes
If it fails ... give up
There is a lot more logic to it than that, but that simplified version makes me wonder if the process isn't just silently crapping out before the tar.gz is available and thus never making it to the scp stage.
Re: SSH Scheduled Backups
Posted: Sun Oct 18, 2015 7:26 pm
by bosecorp
the actual backup works, but instead of getting moved to the remote server, the file stays on the XI server
Re: SSH Scheduled Backups
Posted: Sun Oct 18, 2015 7:33 pm
by jdalrymple
Sorry, I didn't highlight my question but rather buried it in long winded drivel...
Have you modified the component at all, or rather have we modified it for you?
If not I think we will have to. Furthermore it's protected code so I'll have to talk to the developers to see:
a) am I right
b) how do we get you the modified component
Re: SSH Scheduled Backups
Posted: Sun Oct 18, 2015 7:53 pm
by bosecorp
No, I have not
Re: SSH Scheduled Backups
Posted: Sun Oct 18, 2015 10:19 pm
by Box293
bosecorp wrote:Backups take hours to complete. I have a big environment. I can't seat all night and watch it
is there an easier way to troubleshoot this
This command will continue to log the output to a file and you can check it later:
Code: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.log > /tmp/cmdsubsys_watching.log
Re: SSH Scheduled Backups
Posted: Sun Oct 25, 2015 4:34 pm
by bosecorp
here you go. I have PM you the file
Re: SSH Scheduled Backups
Posted: Sun Oct 25, 2015 6:47 pm
by Box293
Great, this file has some good information, specifically right at the end of the backup:
Code: Select all
gzip: stdout: No space left on device
tar: nagiosxi.1445796003.tar.gz: Wrote only 8192 of 10240 bytes
tar: Error is not recoverable: exiting now
What is the output of on your XI server?:
Does the SSH destination have enough free space?
This could indicate a limit issue in the transfer perhaps?
What happens if you try and copy one of the backups files via SSH at the Nagios XI command line? Does it bomb out?