Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-01-2006, 07:08 PM
|
#1
|
|
Member
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238
Rep:
|
leaving an SSH session without terminating a task??
I have inadvertantly got a huge rsync running in my ssh terminal session and it seems that I might kill the rsync and lose all the transfered data if I close the ssh terminal window.
Will closing the window that has the ssh session within close the ssh session itself (I believe it does) and kill the rsync that terminal is in the middle of>?
And can I background that current task or will I just have to start again and remember to use & at the endof the rsync command?
Is screen more like what I need?
TIA
Will
Last edited by stardotstar; 03-01-2006 at 07:17 PM.
|
|
|
|
03-01-2006, 07:14 PM
|
#2
|
|
Senior Member
Registered: Aug 2005
Posts: 1,755
Rep:
|
and then it won't kill the process when you close the session
|
|
|
|
03-01-2006, 07:14 PM
|
#3
|
|
Member
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Gentoo, Slackware
Posts: 217
Rep:
|
Yes, closing the session terminates all tasks running. Using & won't alleviate this problem either, since it's still a child process of the shell. You need to use the nohup (short for "no hangup") utility to allow tasks to continue running after closing a terminal session. See the man page for details.
|
|
|
|
03-01-2006, 07:40 PM
|
#4
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,084
Rep: 
|
The screen command may also be useful. You can detach from your session and re-attach to it later. There's an overview at http://www.kuro5hin.org/story/2004/3/9/16838/14935which may be useful.
|
|
|
|
03-01-2006, 09:28 PM
|
#5
|
|
Member
Registered: Dec 2005
Location: Chicago
Distribution: Fedora and Redhat
Posts: 86
Rep:
|
I might also do an "at" job for this type of thing.
http://www.computerhope.com/unix/uat.htm
|
|
|
|
03-02-2006, 03:55 PM
|
#6
|
|
Member
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238
Original Poster
Rep:
|
Guys, I had problems with this last night.
I was attempting to execute an rsync that required the remote ssh login. So I put it in like
#nohup rsync [blah blah] me@remote:: &
and it accepted that and then when it asked me to accept the certificate [yes/no] and I typed yes it spooled y's down the left side of the terminal and had to be ctrl-c broken...
So I accepted the certificate separately and then re executed the command and the rsync was given a pid and then I was asked for the pass - then I got [ stopped ] and when I tried to exit the shell session I was warned of stopped tasks - I am confused now - so I left it for now!
I have managed to rsync small directories and files without hassel using a direct ssh connection and not quitting it midstream but this is ment to be the main tree backup of my remote system and I need to get the initial 2.8G of data across before the rsync size and session length becomes trivial. Help anyone? Many Thansk
will
|
|
|
|
03-03-2006, 07:05 PM
|
#7
|
|
Member
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Gentoo, Slackware
Posts: 217
Rep:
|
Why don't you try pulling the data to your machine instead of pushing it from the other? That is, say the machine you want the files from is OVERTHERE, and the one you're at is HERE. Right now you're sshing OVERTHERE and then:
Code:
you@OVERTHERE $ rsync ~/stuff you@HERE:~/stuff
Instead you can just rsync from HERE, like this:
Code:
you@HERE $ rsync you@OVERTHERE:~/stuff ~/stuff
|
|
|
|
03-03-2006, 08:59 PM
|
#8
|
|
Member
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238
Original Poster
Rep:
|
You d'man!
That has got it sorted. I am easily pulling 200kps and the job looks like taking 4 hours instead of 59 and then stalling and aborting! Thanks heaps> 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:27 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|