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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-26-2008, 02:47 AM
|
#1
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Rep:
|
Resume download function
I would like to transfer a large file to another server , but I found that the connection is not stable so that the line often broken , that the file is incomplete transferred , can advise is there any command ( eg. ftp , scp ) / method could be resume download after the line is disconnected ? thx
|
|
|
11-26-2008, 03:16 AM
|
#2
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
I thought rsync could do this, but I can't see any explicit mention in the man page - perhaps I'm confusing file sets with individual files. Give it a try.
You could also do it over http, wget has a resume option.
|
|
|
11-26-2008, 03:24 AM
|
#3
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Quote:
Originally Posted by billymayday
You could also do it over http, wget has a resume option.
|
wget works through the ftp protocol, too.
|
|
|
11-26-2008, 03:50 AM
|
#4
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
rsync with -P (equivalent to --progress --partial) seems to do the trick.
|
|
|
11-26-2008, 06:27 AM
|
#5
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Original Poster
Rep:
|
Quote:
Originally Posted by billymayday
rsync with -P (equivalent to --progress --partial) seems to do the trick.
|
thx reply ,
When use the command below , it pops the error , can advise do I need to config sth in remote server ?
rsync -e test.txt root@192.168.0.1:/tmp
error
=====
Failed to exec test.txt : Permission denied
rsync error: error in IPC code (code 14) at pipe.c(82)
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)
|
|
|
11-26-2008, 06:48 AM
|
#6
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
The -e option of rsync specifies the remote shell to use. It requires an argument, for example
Code:
rsync -e ssh blah blah blah
tells rsync to transfer files through ssh. In your example you tell to use test.txt (the file you want to sync) as the remote shell. It is obviously not correct.
|
|
|
11-26-2008, 08:01 AM
|
#7
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Original Poster
Rep:
|
Quote:
Originally Posted by colucix
The -e option of rsync specifies the remote shell to use. It requires an argument, for example
Code:
rsync -e ssh blah blah blah
tells rsync to transfer files through ssh. In your example you tell to use test.txt (the file you want to sync) as the remote shell. It is obviously not correct.
|
thx , I tried -e ssh , it works fine to remote file to remote server,
but I do the testing , copy a large file to remote server , then reboot this remote file , the local server pops the below error , then the copy process stopped and not resumed again , if I want it will be resume download until the file copying is complete , what can i do ? thx
rsync: writefd_unbuffered failed to write 4 bytes: phase "unknown": Broken pipe
rsync error: error in rsync protocol data stream (code 12) at io.c(515)
|
|
|
11-26-2008, 01:45 PM
|
#8
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
Did you read my post and use at least --partial?
Have a read of the man page for rsync to see some examples of usage
|
|
|
11-26-2008, 01:58 PM
|
#9
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
I don't really understand the situation. What do you mean with "reboot this remote file"? Did you shutdown the server during the file transfer? Anyway, I'd follow the advice by billymayday.
|
|
|
11-26-2008, 07:18 PM
|
#10
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Original Poster
Rep:
|
Quote:
Originally Posted by billymayday
Did you read my post and use at least --partial?
Have a read of the man page for rsync to see some examples of usage
|
Yes ,I tried add -P , it shows the transfer status when transferring , but after the remote server is reboot , the transfer will not be resumed , can advise how can make it automatically resume ? thx
|
|
|
11-26-2008, 08:48 PM
|
#11
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
Well I tested it earlier and it resumes for me. Why are you rebooting the server?
Note that it doesn't say "resuming" or anything, it just flies through the part that's already copied.
|
|
|
11-26-2008, 09:11 PM
|
#12
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Original Poster
Rep:
|
Quote:
Originally Posted by billymayday
Well I tested it earlier and it resumes for me. Why are you rebooting the server?
Note that it doesn't say "resuming" or anything, it just flies through the part that's already copied.
|
thx reply ,
I tried stop the network daemon then wait 10 minutes to restart it , the transfer really could be resume , but if I reboot the remote server , it could not be resumed , I think I should not test reboot serve .
thx for all help , it should be ok for me .
|
|
|
All times are GMT -5. The time now is 05:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|