LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-26-2008, 02:47 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
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
 
Old 11-26-2008, 03:16 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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.
 
Old 11-26-2008, 03:24 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Quote:
Originally Posted by billymayday View Post
You could also do it over http, wget has a resume option.
wget works through the ftp protocol, too.
 
Old 11-26-2008, 03:50 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
rsync with -P (equivalent to --progress --partial) seems to do the trick.
 
Old 11-26-2008, 06:27 AM   #5
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by billymayday View Post
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)
 
Old 11-26-2008, 06:48 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
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.
 
Old 11-26-2008, 08:01 AM   #7
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by colucix View Post
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)
 
Old 11-26-2008, 01:45 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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
 
Old 11-26-2008, 01:58 PM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
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.
 
Old 11-26-2008, 07:18 PM   #10
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by billymayday View Post
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
 
Old 11-26-2008, 08:48 PM   #11
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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.
 
Old 11-26-2008, 09:11 PM   #12
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by billymayday View Post
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 .
 
  


Reply


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
VSFTPD: Download resume? Swakoo Linux - General 5 03-26-2008 06:44 AM
Download resume on IP change petersum Linux - General 9 10-11-2006 03:32 PM
FreeNx suspend/resume function not working. bladehaze Ubuntu 1 09-14-2005 08:21 AM
Best downloads with resume function Boffy Linux - Software 7 09-06-2004 04:54 PM
how to resume a download 286 Linux - Newbie 4 01-02-2004 07:03 PM

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

All times are GMT -5. The time now is 05:23 AM.

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