Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.