From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <37aba9a551767195fc98065cc1a2a428@tombob.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] multiple venti servers Date: Wed, 30 Aug 2006 22:51:02 +0100 From: Robert Raschke In-Reply-To: <8ccc8ba40608301123s239a0f5ub7c736be6075fea7@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: ab9a17d2-ead1-11e9-9d60-3106f5b1d025 Francisco wrote: > We start the second venti server (the backup) just to update its > arenas with those > of the primary one. Also, we format a fossil on the backup machine so > we could boot > it upon failures of the primary. > > All clients write to the primary file server (fossil) which has just > one venti on its own > machine. This is the venti backed up to our secondary venti (once per night). > Yup, that's my approach as well. I just start up a venti on my (otherwise "diskless") terminal and then run a backup script on the main server. I got the backup script from somewhere Russ inspired, but for the life of me cannot remember where exactly: #!/bin/rc rfork e . bkup.info fn x { echo x $* y=$1 if(~ $#$y 0){ $y=0 } echo venti/wrarena -h other_venti_hostname -o $2 $3 $$y end=`{venti/wrarena -h other_venti_hostname -o $2 $3 $$y | grep '^end offset ' | sed 's/^end offset //'} if(~ $#end 1 && ! ~ $$y $end){ $y=$end echo '#' `{date} >>bkup.info whatis $y >>bkup.info } } hget http://127.1:8000/index | awk ' /^index=/ { blockSize=0+substr($3, 11); } /^arena=/ { arena=substr($1, 7); } /^ arena=/ { start=0+substr($5, 2)-blockSize; printf("x %s %d %s\n", arena, start, $3); } ' |rc This copies the latest blocks from your main venti to your running backup one. On the backup machine you can then do whatever you want with the venti. For example create yourself a fossil, and as long as you make sure that fossil doesn't snap to the venti, you'll always have a nice pristine copy of your original. Robby