Solved

How to assure an resumes FTP until a download is complete

Posted on 2006-11-24
14
346 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
 
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

920 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

17 Experts available now in Live!

Get 1:1 Help Now