[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Need a script to update directories



Quoting "Burke, Thomas G." <tg burke ngc com>:

Hey all,

	Background:  I do all my web page work in a personal directory
so as not to FUBAR the real web pages.  Problem is keeping the two
synchronized.

	I have thrown together a simple "copy script" that runs as part
of my nightly cron job - it copies *everything* from my working
directory to the actual web directory every night.  These are both on
the same machine, so access is not a problem.

	Problem:  Copying everything is slow and, generally, painful.
There's a couple 100 meg of data there.  I'm looking for a script to
update the web directory with newer/missing files.  I don't mind at all
if some stuff stays there, a true sync isn't necessary.  I just need to
get all the new content pushed to the appropriate place.

I can think of two obvious solutions.

One is to use rsync to keep things in sync. Obvious advantage is that it is simple to setup.

The other one is to use CVS or some other revision control system. You may wish to block access to CVS directories (in case of CVS) it will create in httpd.conf. It is more complicated to setup, but if you already use CVS or some other revision control system to manage those 100 MB of HTML than you already have everything in place. Just do "cvs co whatever-you-call-it" to copy current version out of repository. You are using some kind of revision control system to manage those 100 MB of HTML? Right?

Either will transfer only the updated files.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]