SSH scheduled backup not working but manual run is?!

11 posts / 0 new
Last post
#1 Thu, 05/23/2013 - 06:57
robbrad

SSH scheduled backup not working but manual run is?!

I have a SSH server running on a different port to 22 - this is the server I back up to

using server:port

When I invoke the backup manually - it works fine

But when the schedule runs it fails with the error

Failed to connect to SSH server : ssh: connect to host SERVER port xxxxx: Connection timed out

lost connection

Any ideas why this might work for one and not the other??

Thu, 05/23/2013 - 10:04
andreychek

Howdy,

Hmm, I'm not sure. Is there any chance you could post a screenshot of what your Backup and Restore -> Scheduled Backup -> BACKUP screen looks like?

I'd like to see the various settings you have setup in there.

-Eric

Thu, 05/23/2013 - 10:20
robbrad

Sure see attachment

btw im using ssh key exchange for password-less login - hence no user/password

Thu, 05/23/2013 - 10:24
robbrad

Sorry missed these bits

Thu, 05/23/2013 - 11:09
andreychek

Okay, and just to verify -- when you run the backup manually, how are you going about that?

-Eric

Thu, 05/23/2013 - 11:16
robbrad

I run it from the Scheduled backups list main screen - I click backup next to the job - then I click backup now or backup in the background

Sun, 05/26/2013 - 04:18
robbrad

Bump.

Is it possible to invoke the manual run from cron?

Sun, 05/26/2013 - 19:29
andreychek

One last question, and we may need to get Jamie involved to look into it further...

But when you receive the error message when the backup runs -- it appears to mention a server name and port number in that error message.

Is the port number it mentions correct?

Or is it reverting back to trying to use port 22?

-Eric

Mon, 05/27/2013 - 02:39
robbrad

Yep the server and port are correct in the message. I also turned on the email notification and its the same in there. Whether virtualmin is actually using that is another question.

Like I said what's weird is the same job (same settings) when run manually, works. Just not when scheduled.

Mon, 05/27/2013 - 17:16 (Reply to #9)
JamieCameron

It might be worth trying running tcpdump when the backup is running to see what port it is actually using. This may be a Virtualmin bug (using the wrong port), or it may be that the network / firewall is setup differently at the time the scheduled backup runs.

''

Tue, 05/28/2013 - 04:41
robbrad

Wow do I feel stupid.

I did what you said Jamie - TCPDUMP set a schedule for timenow + 1 min watched tcpdump like a hawk - and the backup went through!

I was like WTF - then realised a few months back I'd had a lot of SSH attacks - so to counteract this I had setup an allow access schedule(the backup was outside that schedule to not affect my home bandwidth) for any IP - but didn't exclude my webserver from the range of IPs

Just to confirm it was my fault and no fault of virtualmin!

Sorry Rob

Topic locked