[ale] ftp upload mirror tool

Master Wizard mainwizard at vei.net
Tue Aug 21 18:40:17 EDT 2001


I can think of several ways to do this, depending on how up-to-date the sites need
to be. Basic idea is to create a shell script that is run by cron on a however
often you need it basis.

You take a snapshot of the filesystem just prior to upload capturing whatever info
you feel appropriate to determine which files have changed. Then, compare this
snapshot to the one you took just prior to the last upload. Any differences are
the files you need to upload (or delete, if you can).

If you need near realtime sync, then the following should work.
1. create a user, such as synccopy, and make him the owner of the filesystem in
question.(all files and directories).
2. make this user the only user capable of writing to the filesystem
3. create a synccopy script that runs as the synccopy user. this ensures that
anyone wishing to change a file in the filesystem has to use the script.
4. the script cp's the file(s) in question to the filesystem and then ftp's the
same file out to the remote systems. you could use a csv file to hold the url/ip's
of the remote systems.

Since it is possible for a remote site to be offline when this happens, you would
also need a cron job to check for changes that might have been missed. Schedule
that for as often as you need.

Hope this gives you some ideas.
Ed.

Jim Popovitch wrote:

> --- Trey DArley <tdarley at net-hopper.com> wrote:
> > Re: wget... Depends on which way you are trying to mirror,
> > doesn't it? And upon how much control you have over the ftp
> > host in question...
>
> That is exactly my problem, I don't have shell access to the
> destinations.  What I need is wput, not wget. ;)
>
> Thanks to everyone who responded,
>
> -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.

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list