需要恢复 Subversion 存储库数据库

需要恢复 Subversion 存储库数据库

我目前正在使用带有 Berkeley DB 的 svn,今天当我尝试访问存储库时收到错误“无法打开请求的 SVN 文件系统”。

当我运行“svnadmin recovery”时,我得到以下信息:

svnadmin: DB_RUNRECOVERY: Fatal error, run database recovery
svnadmin: bdb: DB_LOGC->get: LSN 564/955694: invalid log record header
svnadmin: bdb: Skipping log file e:\svn\db\log.0000000368: historic log 
version
10
svnadmin: bdb: DB_LOGC->get: log record LSN 564/955710: checksum mismatch
svnadmin: bdb: DB_LOGC->get: catastrophic recovery may be required
svnadmin: bdb: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
svnadmin: bdb: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery

我已经下载了 Berkley DB 二进制文件,并尝试运行 db_recover,但出现以下错误:

c:\Program Files\Sleepycat Software\Berkeley DB 4.4.20\bin>db_recover 
-vech e:\svn\db
Finding last valid log LSN: file: 565 offset 131910
db_recover: DB_LOGC->get: LSN 564/955694: invalid log record header
db_recover: Skipping log file e:\svn\db\log.0000000368: historic log 
version 10
db_recover: DB_LOGC->get: log record LSN 564/955710: checksum mismatch
db_recover: DB_LOGC->get: catastrophic recovery may be required
db_recover: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
db_recover: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
db_recover: PANIC: fatal region error detected; run recovery
db_recover: unable to join the environment
db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database recovery

我的问题听起来与这里描述的问题类似:

http://svn.haxx.se/users/archive-2004-08/1341.shtml

因此,我从 db 目录中删除了 __db* 和 lot.* 文件,并尝试再次运行上述命令,但现在 db_recover 和 svnadmin recovery 给出以下内容:

c:\Program Files\Sleepycat Software\Berkeley DB 4.4.20\bin>db_recover 
-vech e:\svn-repair\db
Finding last valid log LSN: file: 1 offset 28

c:\Program Files\Sleepycat Software\Berkeley DB 4.4.20\bin>svnadmin 
recover e:\svn-repair
?w‥u±oAER×RwAecw.
?Dμy?Y; -×’_AER×Rw?]3\±oaa?O?@‥CRE?!...

-×’_§1|‥.
svnadmin: AER×‥t2I 'e:/svn-repair/db' ao Berkeley DB ?u?~, ·i?i|a 
opening 'node
s' table RE:
Invalid argument
svnadmin: bdb: file nodes (meta pgno = 0) has LSN [564][856423].
svnadmin: bdb: end of log is [1][28]
svnadmin: bdb: e:\svn-repair\db\nodes: unexpected file type or format

是的,jibblish 字符确实出现了。

如果有人能帮助我恢复数据库,我将不胜感激。:(

相关内容