Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-1817

'svnadmin hotcopy' backup has dangerous race-condition with BDB 4.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • all
    • 1.1.0
    • svnadmin
    • None

    Description

      'svnadmin hotcopy' follows the standard recommended BDB hot-backup procedure:
      
        1. copy all repository files somewhere else.
        2. recopy just the logfiles.
        3. run recovery on the backup.
      
      The problem is that if you're using BDB 4.2 with the auto-logfile-removal option
      turned on (which is the default for new svn repositories!), there's a race
      condition here.  A logfile still active (or even non-existent) when the copy
      begins (during step 1) might be deleted before being re-copied in step 2.  The
      result is that your backup may not be recoverable, due to incomplete logs.
      
      This is a P1 problem... there's a chance that people are using 'svnadmin
      hotcopy' out there and not getting working backups.
      
      Here's an email with an example (from kfogel) of how to do backups on a
      repository that is *not* doing automatic logfile removal.  This should clarify
      things:
      
      http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=9244
      

      Attachments

        1. 1_floo.txt
          2 kB
          Ben Collins-Sussman

        Activity

          People

            Unassigned Unassigned
            sussman Ben Collins-Sussman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: