svnadmin recover — Bring a repository database back into a consistent state (applies only to
repositories using the bdb
backend). In addition, if
repos/conf/passwd
does not exist, it will create a
default passwordfile .
恢复挂起的版本库:
$ svnadmin recover /var/svn/repos/ Repository lock acquired. Please wait; recovering the repository may take some time... Recovery completed. The latest repos revision is 34.
Recovering the database requires an exclusive lock on the repository. (This is a “database lock”; see the sidebar “锁定”的三种含义.) If another process is accessing the repository, then svnadmin recover will error:
$ svnadmin recover /var/svn/repos svn: Failed to get exclusive repository access; perhaps another process such as httpd, svnserve or svn has it open? $
--wait
选项可以导致svnadmin
recover一直等待其它进程断开连接:
$ svnadmin recover /var/svn/repos --wait Waiting on repository lock; perhaps another process has it open? ### time goes by… Repository lock acquired. Please wait; recovering the repository may take some time... Recovery completed. The latest repos revision is 34.