### 名称 svnadmin recover ― 将版本库数据库恢复到稳定状态(只有在版本库使用`bdb`作为后端时使用)。 ### 概要 ~~~ svnadmin recover REPOS_PATH ~~~ ### 描述 在你得到的错误说明你需要恢复版本库时运行这个命令。 ### 选项 ~~~ --wait ~~~ ### 例子 恢复挂起的版本库: ~~~ $ svnadmin recover /usr/local/svn/repos/ Repository lock acquired. Please wait; recovering the repository may take some time... Recovery completed. The latest repos revision is 34. ~~~ 恢复数据库需要一个版本库的独占锁,如果另一个进程访问版本库,**svnadmin recover**会出错: ~~~ $ svnadmin recover /usr/local/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 /usr/local/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. ~~~