Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 271
Kukanani Avatar asked Sep 16 '13 00:09

Kukanani


2 Answers

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.

like image 198
Kukanani Avatar answered Nov 03 '22 19:11

Kukanani


If you are getting error svnadmin: E140001: Malformed dumpfile header '?\FF?\FES'

Windows SVN dump does not work on Linux SVN if you took backup using PowerShell, I would recommend using vanilla Command Prompt(default) in Windows, It will 10 times faster then PowerShell as well to take dump backup.

svnadmin dump /repository_name > backup_svn.dump

like image 1
Narendra Kumar Avatar answered Nov 03 '22 18:11

Narendra Kumar