[Techtalk] conceptual CVS

Travis Casey efindel at earthlink.net
Fri Jul 18 08:07:49 EST 2003


On Friday 18 July 2003 01:14, Cynthia Kiser wrote:

> Well Emma has already replied that rsync is not an option as that
> would require her to have the admin's install rsync. I was suggesting
> she circumvent the "needs admins" by installing the cvs binary in her
> home directory. That gives her the cvs client and server - but if she
> does not set up a repository on any of the machines she does not
> admin, then I expect no one to be the wiser.
>
> Do you have scp already installed everywhere? It is not as efficient
> as rsync or cvs because it copies all the files not just the ones that
> have changed, but you can use "scp -r" to recursively copy files from
> your working directories on your laptop to the production
> servers. (And how are the admins living without rsync? I would expect
> them to need it for their own purposes)

Something that I've done in the past is to use find's ability to find files 
newer than a specified file, along with GNU tar's ability to take the list 
of files to archive from a file.  For example, a script like this could be 
used:

--------- script to copy everything changed under ~/work -------

#!/bin/sh
CONTROLFILES=/somedir/

touch $CONTROLFILES/last-update-new

cd ~/work

find . -newer $CONTROLFILES/last-update > $CONTROLFILES/copythese

tar cf - -T $CONTROLFILES/copythese |   \
    ssh me at somewhere "cd ~/work ; tar xpf -"

mv $CONTROLFILES/last-update-new $CONTROLFILES/last-update

-----------------------------------------------------------------

Not as efficient as an rsync, since it copies all of each changed file, but 
if you've got a large set of files and most of them don't change often, it 
can be a lot better than having to copy the whole thing regularly.

Of course, to get things started, you'd want to copy everything to the 
remote server, make the CONTROLFILES directory you want to use, then touch 
last-update under it.

--
       |\      _,,,---,,_     Travis S. Casey  <efindel at earthlink.net>
 ZZzz  /,`.-'`'    -.  ;-;;,_   No one agrees with me.  Not even me.
      |,4-  ) )-,_..;\ (  `'-' 
     '---''(_/--'  `-'\_) 



More information about the Techtalk mailing list