LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   scp "lost connection" retry (https://www.linuxquestions.org/questions/linux-newbie-8/scp-lost-connection-retry-506526/)

carlh 12-01-2006 07:38 AM

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).

:Pengy: Is there something I'm missing in the man?

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

Thanks in advance.

macemoneta 12-01-2006 07:41 AM

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/

carlh 12-01-2006 07:44 AM

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 :jawa:

matthewg42 12-01-2006 08:50 AM

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!

alvi2 07-16-2009 04:01 AM

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


All times are GMT -5. The time now is 11:28 AM.