[huskerlug] Re: Synchronizing websites(Mirroring)

And you want them to update each other automaticaly? or are you going to do it
every now and again?

The problem is that server in which you don't have shell access.  One way would
be to run cgi-script on the shell-less server from the shell-ed server that
creates a text file of the files on the shell-less server and the last time they
were modified.
ie: lynx http://nimy2k.com/manu/check_file.<favorite_CGI_language_here>

Then wget this file from the shell-ed server, parse it and compare the dates to
the files on it.  
ie: wget http://nimy2k.com/manu/file_of_dates.txt ;    
    parser.<favorite_scripting_language_here> ;

This should give you an idea of what files are newer where.  Then you can use
wget and ftp to put the latest files in the correct server.  Then run it as a
cron job.

Hey, I never said it was going to be easy, and I'm sure there is a simpler,
sexy-er way.

-Cesar

Quoting Jitesh Batra <jbatra@xxxxxxxxxxxxxx>:

> I've tried wget.It works one way though.
> My problem is that files on the server nimy2k.com do get updated
> and so do the files on the server jitu.net.
> Till now they have no databases , so that is not a problem, but I was
> wondering a way that if server A gets updated , Server B should get
> the
> updated contect from server A, and vice versa.
> I can do this on the Server B, but what happens when server B gets
> updated, how do i update server A.( No shell access there )
> Is there a way i can issue put commands in a script on FTP.
> 
> Thanks
> Jitesh
> 
> 
> On Tue, 24 Jun 2003, Jeff Ives wrote:
> 
> > hm not sure wget -rm could do the php scripts and it would get all
> kinds of
> > artifact files.
> >
> > I would put the "Master" copy on one then crontab a scripted ftp to
> mirror
> > to the other. Really won't matter which one, just be a matter of mgets
> or
> > mputs in the ftp script.  Some don't like this since you have to plain
> text
> > the passwd for FTP.
> >
> >
> > ----- Original Message -----
> > From: "Jitesh Batra" <jbatra@xxxxxxxxxxxxxx>
> > To: <huskerlug@xxxxxxxxxxxxx>
> > Sent: Tuesday, June 24, 2003 1:00 PM
> > Subject: [huskerlug] Synchronizing websites(Mirroring)
> >
> >
> > > Hi all ,
> > > I am trying to build a mirror for my website.
> > > I have two servers
> > > http://nimy2k.com/manu -- Ftp access only
> > > http://photos.jitu.net -- Full shell access
> > >
> > > Neither of these servers allow ssh or rsh.
> > > I was wondering if there was a way to mirror the two sites ,so that
> the
> > > data on both remain the same.
> > > Currently they are having just php scripts , jpeg files and some
> html
> > > files.
> > >
> > > Both of these run on UNIX server.
> > >
> > > Thanks
> > > JB
> > >
> > > ------------------------------------
> > > Jitesh Batra
> > > Research Assistant - ERSL
> > > Gradute Senator - ASUN
> > > Department of Electrical Engineering
> > > University of Nebraska-Lincoln
> > > Voice:+1-402-472-5826(Office)
> > > Email :jbatra@xxxxxxxxxxxxxxx
> > > Visit me at http://jitu.net
> > > ------------------------------------
> > >
> > >
> > > ----
> > > Husker Linux Users Group mailing list
> > > To unsubscribe, send a message to huskerlug-request@xxxxxxxxxxxxx
> > > with a subject of UNSUBSCRIBE
> > >
> >
> >
> > ----
> > Husker Linux Users Group mailing list
> > To unsubscribe, send a message to huskerlug-request@xxxxxxxxxxxxx
> > with a subject of UNSUBSCRIBE
> >
> >
> 
> ------------------------------------
> Jitesh Batra
> Research Assistant - ERSL
> Gradute Senator - ASUN
> Department of Electrical Engineering
> University of Nebraska-Lincoln
> Voice:+1-402-472-5826(Office)
> Email :jbatra@xxxxxxxxxxxxxxx
> Visit me at http://jitu.net
> ------------------------------------
> 
> 
> ----
> Husker Linux Users Group mailing list
> To unsubscribe, send a message to huskerlug-request@xxxxxxxxxxxxx
> with a subject of UNSUBSCRIBE
> 
> 

----
Husker Linux Users Group mailing list
To unsubscribe, send a message to huskerlug-request@xxxxxxxxxxxxx
with a subject of UNSUBSCRIBE


Other related posts: