[huskerlug] Re: Synchronizing websites(Mirroring)

Here are some thoughts as to how a ftp shell script could work.  This is
assuming server A has ftp access and server B has shell access and the script is
on server B.

* ftp to server A and grab entire site into a temp directory.

* Check date differences between files from A and files on B.

* if files from A are newer, copy the temp directory contents to where they 
  need to be on server B.

* if files on B are newer, do another ftp and send files from B to A.

* if files are the same, do nothing.

* Delete temp directory.

Of course, this all depends on whether you can preserve date properties when
transferring files.  It's been a while since I've used regular FTP, so you may
want to look into that.  Otherwise the copy from server A will *always* appear
newer.

--Ben Chavet


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: