Login | Join Now

fsfsverify.py

The fsfsverify.py script helps you verify and repair a corrupted FSFS repository.

Overview

Note: You can use svnadmin recover only for BDB repositories.

A particular kind of FSFS repository corruption results in the "read length line error". In this situation, running svnadmin verify on the server may result in messages like this:

.... 
    * Verified revision 48.
    * Verified revision 49.
    * Verified revision 50.
  svnadmin: Can't read length line in file 'specification/db/revs/51'

The exact sequence of steps that results in this error has proved difficult to determine. However, when you get this error, run the fsfsverify.py script with -f option to fix the corruption.

Usage

Important: You must always back up your repository before using fsfsverify.py.

Use the script as follows:

  $ sudo -u httpd [RUNTIME_DIR]/scripts/fsfsverify.py -f /path/to/repos/db/revs/corrupted-rev-file

Options

-f [corrupted-rev-file] |--fix-read-length-line-error [corrupted-rev-file]
The corrupt version which causes the "read length line" error.

Example

If you see the "read length line" error message against version 51 for an FSFS-backed project "svnproject", try this command to fix the repository:

  $ sudo -u httpd [RUNTIME_DIR]/scripts/fsfsverify.py -f \
  /u1/sourcecast/data/adapter-svn/repositories/svnproject/db/revs/51