Link to home
Start Free TrialLog in
Avatar of MikeKane
MikeKaneFlag for United States of America

asked on

SVN problem - Repo will not load

Any thoughts on the following:  


We have several  svn repository's located in /svn/repos/ such as
/svn/repos/project1
/svn/repos/project2

We have a backup script which essentially runs, as the www-data user, the following command on every repo:
svnadmin dump /svn/repos/project1 | bzip2 -9 >
/backup/project1-backup.svndump.bz2

This worked fine for a long time until something changed and /backup was recreated blank and the ownership of the older was wrong. www-data no longer had access to write to /backup so the backup would have failed.

For whatever reason though, in all the repo's key system files are missing now, files that make svn recognize the folder as "svn enabled".

The /svn/repos/project1/format file was missing, when I put the "format"
file back from a newly created repo, svnadmin verify then complained the /svn/repos/project1/locks/db.lock file was missing. When I put that file back in place from a newly created svn repo, then svnadmin verify complained about /svn/repos/project1/db/DB_CONFIG file missing.  So at least 3 key files are missing, presumably much more.  The only explanation is that the svnadmin dump command removed these core files but not sure why or how to repair the svn structure. The folders themselves are large, so the data is there/in-tact but I have no idea how to get svn to rebuild the missing files.


www-data@svnserv:/svn$ svnadmin verify /svn/repos/project1/
svnadmin: Can't open file '/svn/repos/project1/format': No such file or directory

www-data@svnserv:/svn$ svnadmin recover /svn/repos/project1/
svnadmin: Can't open file '/svn/repos/project1/format': No such file or directory

www-data@svnserv:/svn$ cp /svn/repos/newtestrepo/format /svn/repos/project1/ www-data@svnserv:/svn$ svnadmin verify /svn/repos/project1/
svnadmin: Error opening db lockfile
svnadmin: Can't open file '/svn/repos/project1/locks/db.lock': No such file or directory

www-data@svnserv:/svn$ svnadmin recover /svn/repos/project1/
svnadmin: Error opening db lockfile
svnadmin: Can't open file '/svn/repos/project1/locks/db.lock': No such file or directory

www-data@svnserv:/svn$ cp repos/newtestrepo/locks/db.lock repos/project1/locks/ www-data@svnserv:/svn$ svnadmin verify /svn/repos/project1/
svnadmin: Berkeley DB error for filesystem '/svn/repos/project1/db'
while opening environment:
svnadmin: Can't open file '/svn/repos/project1/db/DB_CONFIG': No such file or directory

www-data@svnserv:/svn$ svnadmin recover /svn/repos/project1/ Repository lock acquired.
Please wait; recovering the repository may take some time...
svnadmin: Can't open file '/svn/repos/project1/db/DB_CONFIG': No such file or directory



ASKER CERTIFIED SOLUTION
Avatar of Joseph Gan
Joseph Gan
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MikeKane

ASKER

We solved this by taking our weekly backup and dumping back into a new 1.6 server build.   We manually checked in the missing items to get us back up and running.   Very manual but the restore was the only way.