LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-03-2006, 10:22 PM   #1
lothario
Member
 
Registered: Apr 2004
Posts: 340

Rep: Reputation: 30
Is it possible to make scp Continue/Resume after an interruption?


Is it possible to make scp Continue/Resume copying a file after an interruption?
I have only scp/ssh access to a host and I would like to have scp recover and continue, when necessary.

But how?
 
Old 06-03-2006, 10:52 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
No, but you can use rsync which can continue an interrupted transmission if you have ssh access:

rsync --rsh='ssh' -av --progress --partial source user@host:destination
 
Old 06-03-2006, 11:13 PM   #3
lothario
Member
 
Registered: Apr 2004
Posts: 340

Original Poster
Rep: Reputation: 30
Ok, I am trying to do this - but where do I enter the password for the remote system?

Also, is it possible to have it recursively go down a source directory structure
and scp each file and directory over to the destination?
 
Old 06-03-2006, 11:21 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Ad 1)
It should prompt you for a password... (I think)

Ad 2)
Yes, man rsync for details ;}


Cheers,
Tink
 
Old 06-03-2006, 11:28 PM   #5
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
You can use the same authentication you use for ssh. That is, if you have exchanged keys with no passphrase, rsync can connect without prompting. If you normally are prompted for a password/passphrase, you will be prompted by rsync.

The '-a' option in the example will perform the recursive processing of subdirectories (as well as other common processing). As Tinkster indicated, man is your friend:

man rsync
 
Old 06-03-2006, 11:40 PM   #6
lothario
Member
 
Registered: Apr 2004
Posts: 340

Original Poster
Rep: Reputation: 30
Got it, thanks.

The reason the password was not being asked was because
on the remote system the sshd does not run on port 22.

So I changed
--rsh='ssh'
to
--rsh='ssh -p nnnn'
and it worked.
 
  


Reply



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
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
Signals and Threads Interruption allomeen Programming 1 12-19-2005 05:16 PM
pause/resume an ssh make or other process linuxhippy Slackware 4 09-01-2005 05:03 AM
lfs-6.1 Bash-3.0 [make test]log:could be error to continue?? ukyo Linux From Scratch 2 08-25-2005 07:35 AM
SCP resume aborted download zahoo Linux - Networking 3 03-08-2005 03:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:52 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