[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How do I quiesce the repository?

From: Bart Robinson <lomew_at_pobox.com>
Date: 2006-01-07 21:00:16 CET

Here are a couple things to consider:

1. If the db only has to be down for a "little while", you can
   basically ^Z inetd by sending a kill -STOP on it, wait for
   existing svnserves to finish, do the backup, then kill -CONT
   on it. Remote users will see a delay for the time inetd is
   stopped. This delay is probably too long and will confuse
   people. Also if inetd is handling other things that you want
   to be up you would need to run a separate instance of inetd
   (or use socat to effect the same).

2. You can try replacing svnserve in the inetd conf file with a
   script like this (also waiting for exising svnserv procs to
   finish). kill -HUP will get it to re-read (USR2 does too on
   mine but I don't know the deets).

        #!/bin/sh
        
        err=1234
        msg="Error: subversion database is down for routine maintenance"
        file="foo"
        line=0
        
        echo "( failure ( ( $err ${#msg}:$msg ${#file}:$file $line ) ) )"
        exit 0

  Then users will see:
        70 minna:/tmp/> svn info svn://church/sport
        svn: Error: subversion database is down for routine maintenance

  I'm not sure how GUI clients would display that but as far as
  I could tell that is a valid way to indicate error to a svn://
  client.

This is assuming of course you have no file:// or http://
clients going on.

-- bart

On 2006-1-6 Paul Koning <pkoning@equallogic.com> wrote:
> My management is cautious about backups (having been burned by
> database corruption in the past). So I need to be able to do at least
> some of my backups simply by turning Subversion off (no writes to the
> repository internals), then copy the repository data, then turn it
> back on. We'll also use svnadmin hotcopy, but not exclusively.
>
> Somewhere I got the impression that checkouts and updates create
> temporary transactions as the mechanism for getting a consistent
> view. Am I confused?
>
> To put it differently, what do I need to do to ensure that NO writes
> will take place in the repository?
>
> 1. Set the access controls to forbid writes? (Svnserve, V1.2.3)
> 2. Set the access controls to forbid all access?
> 3. Stop the server entirely? (A bit messy -- it's set up to use
> xinetd right now...)
> 4. Something else?
>
> Also... does svnserve write any temporary files for caching or the
> like? If yes, how do I get it to stop doing that?
>
> Thanks,
> paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Jan 7 21:03:11 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.