decompression of svn diff data failed

Ihsan chahi picture Ihsan chahi · Apr 10, 2014 · Viewed 7.8k times · Source

Hi friends,

I am working on Visual SVN since last year and i take its backup regularly, but today early morning i am facing a problem while taking backup,when i execute backup script i am getting following error.

* Dumped revision 1.
* Dumped revision 2.
* Dumped revision 3.
* Dumped revision 4.
svnadmin: E140001: Zlib <Uncompress>: Corrupt Data: decompression of Svndiff data failed.

please guide me how to solve it.

Answer

bahrep picture bahrep · Jul 7, 2016

The behavior seems to be a result of the repository corruption due to disk/power failure. Have you already run chkdsk? Do you have a backup to recover?

According to the output of svnadmin dump, the repository is corrupted and has to be restored from a backup. The best and easiest approach would be to restore the repository from a healthy backup taken before the disk corruption happened.

I'd like to note that Subversion does everything it can to prevent such issues. However, a power or disk failure that happens in a middle of an operation still can cause repository corruption. You should ensure that there is an uninterruptible power supply on production VisualSVN Server installations. In other words, you should ensure that the power loss does not lead to immediate and unexpected server shutdown.

It is important to note that if there was a power or disk failure that could affect the repositories, then you should not commit any real work to those repositories that give you errors. There is a chance that the newly committed data will be lost.

Here is a short list of actions you have to perform if a power or disk failure:

  1. Put your repositories offline, e.g. by stopping VisualSVN Server's HTTP service,
  2. Run Test-SvnRepository PowerShell cmdlet or svnadmin verify tool against each repository to check it for consistency,
  3. Run chkdsk tool to verify the storage,
  4. If a repository or some of them are corrupted, you have to restore a backup.

    IMPORTANT: You must recover a backup to an empty directory to make sure that restored repository files won't mix with files of the broken one. After repository is recovered, you can delete broken repository and then replace it with the recovered one. It also makes sense to check the recovered repo using svnadmin verify right after you restore it.

  5. Start VisualSVN Server's service.