LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2007, 11:46 AM   #1
helpmhost
Member
 
Registered: Oct 2006
Posts: 43

Rep: Reputation: 15
Auto detect a closing connection


Hi,

I need to back up our Windows file server onto our Linux backup server. The data is sensitive, so we need to transfer it to the backup server in an encrypted format.

We are planning on having the windows server put all the file in one large .7z file and then uploading that file to the backup server using SCP. The backup server will then backup the file to tape. The problem with this, is that the backup server does not know when the upload is finished and therefore does not know when to start archiving to tape. The backup server is on a tight schedule, so making the server just wait a long time is not really an option.

I know that the easy way to fix this is to have the backup server download the file from the windows machine, but we do not want to install an SCP server on the windows machine.


So is there any way that I can setup the backup server to detect the SCP connection closing and then trigger the backup-to-tape script to start?

Thanks.
 
Old 01-23-2007, 11:54 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
There are two common ways to do this:
1.) Have the Windows machine send over a 0byte "trigger file" after it's done uploading the files it needs to backup. The backup server will have a cron job running every 1 minute to see if the trigger file has been written yet. If the trigger file exists, the backup file moves the data out of the way and removes the trigger file.

2.) Have the Windows server execute a batch job to send the file over and after the scp command finishes, do an ssh to the backup machine and issue some single command that triggers the backup process. You can even have the Windows server start the backup process itself and log out while it runs in the background (using the nohup command).
 
Old 01-23-2007, 01:25 PM   #3
helpmhost
Member
 
Registered: Oct 2006
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks for the quick reply.

A question on your solution #2. Since this will be automated, how to I get the windows machine to execute a command/script over ssh?

Thanks.
 
Old 01-23-2007, 01:30 PM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
ssh user@host "command"
 
Old 01-23-2007, 02:08 PM   #5
helpmhost
Member
 
Registered: Oct 2006
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks.

Would that work for putty (run from command line) as well?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
auto detect proxy ilnli Linux - General 4 03-10-2006 12:44 AM
Firefox current seems to be kind-of-auto-closing johnnydangerous Fedora 2 03-08-2005 11:25 PM
SMTP Connection Closing inforlinx Linux - Networking 2 11-04-2004 05:27 PM
X Windows Auto-detect Brother Michael Debian 3 05-13-2004 11:53 AM
Why does Red Hat 7.2 not auto detect my connection as 7.1 does? AMDPwred Linux - Distributions 4 01-15-2002 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration