Search code examples
svnsvnadmin

How to migrate a SVN repo that has a svnadmin: Decompression of svndiff data failed


I am trying to migrate a SVN repo from a remote host, but using svnadmin from cli on that host, I got this error after 6372 revision:

Dumped revision 6372 
svnadmin: E185005: Decompression of svndiff data failed

I have not run yet fsfsverify because I dont have a workable backup, only those with this error.

Can simply copy paste the svn to another system to be able to work, or if I can only migrate/Backup using the svnadmin command?

The remote host company gave us only this week to shutdown that SVN, in order to be possible to migrate other applications.


Solution

  • To avoid such issues in future, you need to regularly verify consistency of your repositories and make backups.

    So my question is if I can simply copy paste the svn to another system to be able to work, or if I can only migrate/Backup using the svnadmin command.

    Yes, you can copy the repository as-is to another computer if your remote host company gives you this option. Make sure to stop svnserve or Apache service before you begin - this will ensure that the repository is not being worked with when you copy it.

    Dumped revision 6372 
    svnadmin: E185005: Decompression of svndiff data failed
    

    Your repository has at least one corrupt revision and has to be repaired manually. There are two main routes:

    • Find a healthy backup of this repository and use it to restore consistency of the repository. Restore a backup as-is or use its data to replace corrupt revisions. I.e., you need to create a copy of your current repository and look for non-corrupt backups. Replace the corrupt revision files in the repository copy with the files from backup. Use svnadmin verify to check consistency of the repository.
    • If you don't have a backup, you may need to replace corrupt revisions with an empty revision to restore consistency of the repository. Normally, this would involve dumping all healthy revisions with svnadmin dump and loading them into a new empty repository. All corrupt revisions have to be replaced with an empty one manually (e.g., by loading an empty revision with svnadmin dump.