Solved

How to assure an resumes FTP until a download is complete

Posted on 2006-11-24
14
349 Views
Last Modified: 2010-05-18
I have to sync a directory from a remote server. The FTP link is pretty fast, but for some unknown reason cannot finish an entire file in one ftp download, it always needs to resume to do it:

I would like to know if their is a program or script out their that will :

- download all latest files
- if transfer fails to resume until entire file is down
- maintain remote time stamp

Ideally

- be notified via email if a download is unsuccessful for an extended period (but to continue to try and download)
- be emailed when a download occurs

Unfortunately I cannot put rsync on the remote server or i would of done that. All i have is FTP

Thanks
0
Comment
Question by:jaycangel
  • 4
  • 3
  • 2
  • +2
14 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 100 total points
ID: 18008550
seem like wger is capable of resuming transfer.
Read: man wget
options -c -r
0
 
LVL 34

Assisted Solution

by:PsiCop
PsiCop earned 100 total points
ID: 18010178
There are no facilities in the FTP protocol itself to resume an interrupted download, as there were in, say, the old Z-Modem protocol. Any resumption capability woiuld be an extension of the FTP protocol that must be provided for by the client and server softwares, which have to agree on how to do it. If your softwares don't support that functionality, then you're kinda stuck.
0
 
LVL 14

Assisted Solution

by:ppfoong
ppfoong earned 100 total points
ID: 18010354

There is a perl script named as "mirror" that can do exactly what you want with FTP, which has been existing and in used by many mirroring FTP sites for decades.

It is probably included in your Linux distro CD.

0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 43

Expert Comment

by:ravenpl
ID: 18010592
> There are no facilities in the FTP protocol itself to resume an interrupted download
Almost every server supports reget command. wget will use it if transfer was interrupted.
0
 
LVL 20

Assisted Solution

by:Gns
Gns earned 100 total points
ID: 18014189
I used to use wget a lot in situations like this (mirroring stuff from /nai/mcafee, amongst other things), but have now moved on to lftp and its mirror function. Very slick commandline ftp client, very stable mirroring functions. lftp is part of most distros, but you can find it at: http://lftp.yar.ru/
Try it, you'll like it:-).

-- Glenn
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 18017000
Hi,

You might as well try to use rsync command too
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 100 total points
ID: 18017021
Hi,

You might as well try to use rsync command too. This way you can use versioning tc. You will be able to copy only the modified files on subsequent runs.

A command like that:

rsync -avz foo:src/bar /data/tmp

assuming your server name is foo and directory to copy is foo/bar into your backup systems /data/tmp with all the permisions, symlinks, directory structure etc. are preserved and using compression during the transfer.

It is also possible to do the transfer over SSH and this way you wont need to transfer passwords etc. in cleartext like ftp
does.

Cheers,
K.
0
 
LVL 20

Expert Comment

by:Gns
ID: 18017194
Uh, KeremE... s/he says in teh question: no rsync....:-)

-- Glenn
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 18017740
> Uh, KeremE... s/he says in teh question: no rsync....:-)

He says "Unfortunately I cannot put rsync on the remote server" by that I guess he/she means he can not run rsync server n daemon mode but the comand I listd above will connectthe server over SSH and get files via SSH and would not need rsync run there in server mode.

This is a matter of interpretation :)
0
 
LVL 20

Expert Comment

by:Gns
ID: 18017847
True:-)

-- Glenn
0
 
LVL 20

Expert Comment

by:Gns
ID: 18266097
All participants have either mentioned tools that will be able to do this, or info that is correct (PsiCop), so ... split it any which way you want to:-).

The asker could have taken the time to go more in-depth with any of us, but chose not to... it seems.
Or we collectively missed the askers point totally, in which case this should be a delete/refund... but only the skaer can really tell us that:-)

-- Glenn
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question