Simon Elliott
Simon Elliott

Reputation: 2117

Recover files from old Subversion backup

I have a tar backup from an old subversion server which has long since died. All the source code which had been managed by this server is legacy code which will never be needed again ... except this one project.

The tar file is full of little directories like "conf", "dav", "db"...

Is there any way of extracting the final source code of a single project from this backup?

Upvotes: 4

Views: 3238

Answers (3)

Gabriel Solomon
Gabriel Solomon

Reputation: 30105

you could load the whole backup to the new server

tar xvf oldSubversionServer.tar | svnadmin load /var/svn/repos/temp

and then only dump that project

svnadmin dump /var/svn/repos/temp/project | gzip -9 > dump.gz

Load contents of a dump into the repository

gunzip -c dump.gz | svnadmin load /var/svn/repos/your_import_repo

this way you can keep you revisions for that project.

Upvotes: 1

mouviciel
mouviciel

Reputation: 67889

You only have to extract the repository directory as a whole from the tar archive:

tar xvf oldSubversionServer.tar path/to/subversion/repository

Then you can browse the repository or create a working copy of your project with a svn client, using the file: access method.

Upvotes: 7

Craig T
Craig T

Reputation: 2752

Create a new subversion server. Restore the backup into the new server. Copy the code you need out into your current subversion server.

Upvotes: 1

Related Questions