CVS question: export complete config everyfriday

john heasley heas at shrubbery.net
Fri Jul 1 15:26:15 UTC 2005


Fri, Jul 01, 2005 at 08:07:57AM -0400, dharmesh:
> 
> 
> 
> 
> Ah well, they say its not as bad as they say it is.
>                 ---------anonymous
> 
> Hello All,
> I have been an avvid user of Rancid since 2002.
> We have been using ver rancid v2.0 to 2.3  on Linux Redhat 9 to Fedora Core 3.
> 
> Now my boss has enforced some LAME process upon us.
> He wants us to have Complete config  backup taken every friday of all devices. 
> 
> Obviously  rancid has been doing it ,  daily twice ( via cron ) & storing it in CVS.
> 
> Now i know its more of a CVS question then rancid question. But i thought you guys could help me out.
> 
> 
> So here it is :
> How do i extract complete device configs as they stand on every friday from the CVS ?
> 
> I could write a cron job , & zip the files later & email them. 
> All that i can do, but not sure how i can do the first step itself. i.e extract the complete config from cvs .

This is really a CVS question, which you could answer by looking at CVS
manual/FAQs/tutorials, but

create a tmpdir w/ a checked-out copy of the repositories
$ mkdir tmpdir;cd tmpdir
$ . /usr/pkg/etc/rancid.conf
$ for f in $LIST_OF_GROUPS; do
> cvs -ud /var/rancid/CVS co $f
> done

from cron,
$ cd tmpdir
$ . /usr/pkg/etc/rancid.conf
$ for f in $LIST_OF_GROUPS; do
> (cd $f; cvs -u update)
> done

OR

from cron, something like
$ cd /var/rancid
$ find -s */configs -type f -a -maxdepth 1 \
	-exec cvs -u co -p {} >> /tmp/configs 2>&1 \;




More information about the Rancid-discuss mailing list