LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 12-01-2006, 08:38 AM   #1
carlh
LQ Newbie
 
Registered: Dec 2006
Posts: 2
Thanked: 0
scp "lost connection" retry


[Log in to get rid of this advertisement]
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.
carlh is offline  
Tag This Post , , , ,
Reply With Quote
Old 12-01-2006, 08:41 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86, x86_64, PPC
Posts: 3,543
Blog Entries: 1
Thanked: 0
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/
macemoneta is offline     Reply With Quote
Old 12-01-2006, 08:44 AM   #3
carlh
LQ Newbie
 
Registered: Dec 2006
Posts: 2
Thanked: 0

Original Poster
Thumbs up

Quote:
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
carlh is offline     Reply With Quote
Old 12-01-2006, 09:50 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,495
Thanked: 6
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!
matthewg42 is offline     Reply With Quote
Old 07-16-2009, 05:01 AM   #5
alvi2
Member
 
Registered: Feb 2005
Posts: 72
Thanked: 0
Which is better for resuming

1) rsync --partial --progress myFile remoteMachine:dirToPutIn/
got url: http://joen.dk/wordpress/?p=34


2) rsync -a --partial --inplace /home/bigfiles/ 192.168.1.1::mybackups/bigfiles/
got url :http://www.sysresccd.org/Sysresccd-m...ta_using_rsync


please solve as i am really confuse about both of these
alvi2 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 11:48 PM
scp "Connection Timed out" after a while ku2006 Linux - General 1 05-03-2006 01:37 PM
"Anaconda" and "mini-wm" lost connection to display :1.0;??? cbrittain Fedora - Installation 2 03-14-2004 12:22 PM
"Anaconda" and "mini-wm" lost connection to display :1.0;??? cbrittain Linux - General 0 02-24-2004 06:04 PM


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

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration