LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-31-2006, 11:06 AM   #1
Edmunds
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
SCP as a background process


I need to transfer 420GBs of files from one machine to another. I don't have physical access to either, so I'm using Putty to get this done from a windows box. The command I'm doing it with is

Code:
scp -r dir root@xxx.xxx.xxx.xxx:/home2/
But if I close the putty window (as I obviously can't be bothered to keep it on whilst 420GBs transfer as that's gonna take a few days), the transfer stops.

I tried to run it as a background process (adding an &), but it just won't do that, as it's requesting a password. I tried to run it without requesting a password (with -B), but then it just spits out "permission denied".

Any help?
 
Old 12-31-2006, 11:22 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Testing"
Posts: 6,116

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
I think screen is what you need.
man screen, or search this site for how to put process into the background ("detached") with this useful utility.
Hope this helps.
Edit: Here's a link to how to use screen:
http://www.rackaid.com/resources/tips/linux-screen.cfm

... & welcome to LQ!

Last edited by tredegar; 12-31-2006 at 11:29 AM.
 
Old 12-31-2006, 11:29 AM   #3
namit
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 355

Rep: Reputation: 30
try a & at the end of that and it should set it up as a process. or is there a verbose option on scp or debug you could use.
 
Old 12-31-2006, 11:38 AM   #4
billybadfoot
LQ Newbie
 
Registered: Dec 2006
Location: UK
Distribution: Fedora
Posts: 8

Rep: Reputation: 1
You can achieve this by setting up keyed access rather than password access, but making sure that you create a key which doesn't need a pass-phrase. You would install one part of the key on the remote machine and supply the location of the second part of the key to the scp command. As it doesn't require any further passwords, it can be run unattended, for instance as a background job or as a cron/scheduled job.
 
Old 12-31-2006, 12:20 PM   #5
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Try - after entering password - pressing Ctrl-Z and then running 'bg' and 'disown' before logging out.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding Background process. mahabooba Linux - Distributions 3 12-26-2006 04:05 PM
how to run any binary in background - background process tej Linux - Newbie 1 08-16-2004 12:27 AM
scripting a find, cp and bzip2 then scp process onewhoknows Linux - Newbie 2 06-08-2004 06:05 AM
Background process h8r Linux - Newbie 5 01-13-2003 04:21 PM
background process gurra Programming 9 09-30-2001 01:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:20 AM.

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