Skip to content

Malformed dumpfile header when migrating repository from Windows to Linux (encoding issue?)

I’m moving an SVN repository from a Windows machine (Windows 7) to a Linux machine (Ubuntu 13). I dump the repo on Windows with svnadmin dump and copy the files to the Linux machine. Now I’m running

svnadmin load dest-folder < dumpfile

And the terminal responds with

'vnadmin: E140001: Malformed dumpfile header 'SVN-fs-dump-format-version: 2

I suspect that there is a problem with my character encoding (Windows vs. Unix), based on the fact that the single quote goes from the end of the line, where it should be, to the beginning. But I have tried converting the character encoding in Notepad++ and I only receive different errors.

The above error shows up when I encode in UTF-8.

When converted to “UTF-8 without BOM” or “ANSI”:

' into a number04: Could not convert ' 2

When converted into “UCS-2 Big Endian” or “UCS-2 Little Endian”:

svnadmin: E140001: Malformed dumpfile header '?254?255'

I don’t know anything about character encodings, so I don’t know where to turn next. Or perhaps it is a problem with my dump or repo, but I haven’t had any issues with SVN until now.



This answer came from comments by the user kostix on my question.

The issue was that I was using PowerShell to create the dump file. When I switched to using vanilla Command Prompt in Windows, the issue resolves. As pointed out, PowerShell automatically outputs UCS-2 files through pipelines or shell output files, and Linux didn’t like that character encoding.

User contributions licensed under: CC BY-SA
7 People found this is helpful