Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-01-2006, 07:38 AM   #1
LQ Newbie
Registered: Dec 2006
Posts: 2

Rep: Reputation: 0
scp "lost connection" retry

lo all,

I have scp copying over a ~50GB tgz from 'Server A' to an external USB HDD on 'Server B' on LAN (FYI: B does not have enough space to hold the file and then pass it onto the external HDD). It fails out with 'lost connection' (I don't have screengrab of it right now but it is literally just that).

I've considered checking the scp status after running with $? and then retrying however it would be a waste of resources if the scp fails after 95% (or any % really).

I can't seem to find any retry/resume options with scp (maybe for good reasons).

Is there something I'm missing in the man?

Any better methods to securely copy across (FTP via an SSH tunnel, rsync, other)?

Thanks in advance.
Old 12-01-2006, 07:41 AM   #2
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
Rsync is your best bet, as it can recover in the event of a partial copy:

rsync -av --progress --inplace --rsh='ssh' somefile user@server:directory/
Old 12-01-2006, 07:44 AM   #3
LQ Newbie
Registered: Dec 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up

Originally Posted by macemoneta
Rsync is your best bet, as it can recover in the event of a partial copy:

rsync -av --progress --inplace --rsh='ssh' somefile user@server:directory/
Wow, excellent, thanks. I shall do a bit further digging into that then
Old 12-01-2006, 08:50 AM   #4
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
I second that. rsync is good for this stuff. If you update and re-copy this file then you'll see real benefits because rsync works out which parts of the file have changed and sends only the data which is necessary to make the modify the destination to make it the same as the source. One thing to be careful of: Don't get the source and destination mixed up!
Old 07-16-2009, 04:01 AM   #5
Registered: Feb 2005
Posts: 77

Rep: Reputation: 15
Which is better for resuming

1) rsync --partial --progress myFile remoteMachine:dirToPutIn/
got url:

2) rsync -a --partial --inplace /home/bigfiles/
got url :

please solve as i am really confuse about both of these


connection, copy, lost, scp, secure

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
"USB port busy; will retry in 30 seconds..." Red Knuckles *BSD 0 10-12-2006 10:48 PM
scp "Connection Timed out" after a while ku2006 Linux - General 1 05-03-2006 12:37 PM
"Anaconda" and "mini-wm" lost connection to display :1.0;??? cbrittain Fedora - Installation 2 03-14-2004 11:22 AM
"Anaconda" and "mini-wm" lost connection to display :1.0;??? cbrittain Linux - General 0 02-24-2004 05:04 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:05 PM.

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