Solved

How to assure an resumes FTP until a download is complete

Posted on 2006-11-24
14
343 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
Comment Utility
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
Comment Utility
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
Comment Utility

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
 
LVL 43

Expert Comment

by:ravenpl
Comment Utility
> 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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
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
Comment Utility
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
Comment Utility
Uh, KeremE... s/he says in teh question: no rsync....:-)

-- Glenn
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
> 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
Comment Utility
True:-)

-- Glenn
0
 
LVL 20

Expert Comment

by:Gns
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now