7

I received an SVN dump file with a lot of pages (all HTML pages, and all server-side code as well) in the file. I'd to separate them out, but have no clue how to do this.

I'm on windows and I don't get SVN at all.

gbjbaanb
  • 51,617
  • 12
  • 104
  • 148
Brooke
  • 71
  • 1
  • 1
  • 2
  • Are you saying that you received an html output of every file in the SVN combined? Or you received a listing of all the files in the repo? – Suroot Jul 10 '11 at 18:21
  • 2
    The questions is waaaay to vague. You have a svn dump file? What do you want to do? Just extract some files? Or extract a repository containing some paths of the dump? – Turbo J Jul 10 '11 at 20:31

3 Answers3

10

The answer by Adam Butler is nearly perfect, but I got a few problems with it, so here is my working solution :

In a DOS windows (Use ConEmu for a better one)

First cd to your svn folder tools
mkdir d:\dumpRepo
svnadmin create d:\dumpRepo
type [PATH TO DUMP].dump | svnadmin load d:\dumpRepo
svn export file:///d:/dumpRepo d:\Exportedfiles

It's really important that the file URI for svn export contains only regular /

Guillaume
  • 1,076
  • 10
  • 21
5

There is a simple guide here - it is for linux/unix but works from a dos prompt: http://www.mhermans.net/get-files-from-svn-dump.html

First - download the command line svn http://subversion.apache.org/packages.html#windows This can be a challenge but eventually you will have svn.exe and svnadmin.exe in a bin folder somewhere. Once you have that it is smooth sailing:

From a dos box:

mkdir c:\backup_repo
[PATH TO SVN]\svnadmin.exe init c:\backup_repo
type [PATH TO DUMP].dump | [PATH TO SVN]\svnadmin.exe load
[PATH TO SVN]\svn.exe export "file:///C:\repo" c:\exportdest

HTH

Adam Butler
  • 3,023
  • 5
  • 35
  • 40
  • 3
    I got a comment per mail on that old blog-post a few weeks ago: "`svn init` was not an option; had to: `svnadmin create backup_repo`". Have not tested it, but perhaps it will help. – mhermans Dec 27 '13 at 09:41
  • 1
    'init' didn't work for me either, 'create' did. On Windows 7. – DCShannon Aug 26 '16 at 18:24
  • Of course, then the next line doesn't work: "c:\Code\Iris>type svn\svn.svn_dump | svnadmin load svnadmin: E205000: Repository argument required The process tried to write to a nonexistent pipe." – DCShannon Aug 26 '16 at 18:26
3

Assuming you have a full dump and not an incremental one you can extract the files easily. They are stored with a small piece of header information (including the size of the file) followed by the file itself.

If you've got an incremental dump (where you have the intial version of the file and then only the deltas)(ie the changes to each file when they were committed) you have a more difficult problem. However, there's an easy solution:

Install VisualSVN Server or http://www.ubersvn.com/ and use it to import the dump. Then use a tool like TortoiseSVN to see the history and export each file individually (ie, you just created a copy of the dumped svn repository and are now accessing it like any subversion user).

gbjbaanb
  • 51,617
  • 12
  • 104
  • 148
  • It's full, by the sounds of it. I have VisualSVN and SilkSVN, what can I do to extract the full data? – Brooke Jul 11 '11 at 18:40
  • read http://svnbook.red-bean.com/ to understand SVN, especially the bit about importing a dump into a repository. then start using your new repo. – gbjbaanb Jul 14 '11 at 15:41
  • This process worked on Windows 7, install the VisualSVN server then use TortoiseSVN. For the import you may want to refer to https://www.visualsvn.com/support/topic/00010/#import-local – Will Tartak May 21 '16 at 20:14