[ale] ftp upload mirror tool
Jeff Hubbs
jhubbs at telocity.com
Tue Aug 21 00:55:17 EDT 2001
Jim -
You could still do it in expect, especially if your FTP repository - the
one(s) you're pushing to - is "safe," i.e. no changes take place out of
your control.
Here is one way to do it: When you first make your repository, for each
file, use md5sum to create a hash and save the result in a file in the
repository with a name like <original_filename>.md5sum (maybe you could
prefix it with a dot such that your FTP daemon would't show the files in
the list, provided there is some daemon that works that way). Then, use
expect and perhaps ncftp to crawl the FTP repository's tree and yank
down the md5sum text files, comparing them one at a time to the md5sums
of the corresponding files in the "origin" tree. If the md5sums don't
match, execute a put. Of course you wold also need to deal with new
files and deletions.
You may be able to use wget for some of this operation. As an
alternative to planting all those md5sum files, you could to a get on
each file in the repository and compare md5sums on your end, but i get
the feeling that woudl defeat the purpose.
- JEff
Jim Popovitch wrote:
>
> Thanks, but I'm really looking for tool that will do comparisons and
> only update the necessary files. Something like rsync, but for ftp.
>
> -Jim P.
>
> --- Jeff Hubbs <jhubbs at telocity.com> wrote:
> > Jim -
> >
> > Does this sound like a job for expect?
> >
> > - Jeff
> >
> > Jim Popovitch wrote:
> > >
> > > I've seen a lot of ftp mirror tools that will allow me to keep a
> > local
> > > copy in line with a remote. But, what I need is a Linux ftp mirror
> > > tool that does puts, not gets. I want to take my data and push it
> > out
> > > to other sites. Protocol must be ftp. Any experience w/ a good
> > tool?
> > > Ncurses or X would be preferred.
> > >
> > > TIA!
> > >
> > > -Jim P.
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Make international calls for as low as $.04/minute with Yahoo!
> > Messenger
> > > http://phonecard.yahoo.com/
> > > --
> > > To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in
> > message body.
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list