Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Resume download using ftp url connection  RSS feed

 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use ftp url connection for getting files from a FTP server. It works fine, however sometime conection gets lost, so I have to restart the process. Since I use this for backup purpose, transfered files can be quite large (about 10-20GB), it's pitty to restart complete download at mostly finished file. I know that ftp clients as wget support resume. How can I do resume using ftp url connection? Pointing me to ftp RFC is more than sufficient.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google's first link for the keywords "ftp url" looks pretty good to me:

http://www.cs.tut.fi/~jkorpela/ftpurl.html

It contains references to the actual RFCs if you really want to read them, but from that page it's clear that there is no option in the URL to do anything but get an entire file.

There are probably FTP commands to start reading partway through the file, but you would have to be using an FTP client to use those commands, not just a URL.
 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, it looks like I can subclass ftp url connection to access underneath ftp client object and reach desirable behavior. I can also register my URL handler to make process of using my class automatic. Strange that google gives you links from Finland.
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To perform a FTP resume you must issue the REST command to the server. I'm not sure that the ftp url syntax will allow you to do this as when using the ftp url syntax there is no way of telling it the offset from which to resume file transfer. To accomplish this you would need to use raw sockets.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!