svnbackupvisualsvn-server

Backup of svn repository to shared folder on NAS fails


I want to set up an automatic incremental backup of my SVN repositories. Doing that to a local folder of the same PC seems to work, but if I try to write the files directly to a shared folder (I tried 2 different QNAP nas boxes) I get various errors, always a couple of hundred lines.

I tried

svnadmin hotcopy C:\SVNRepos\RalfStein \\Nas\home\svn\RalfStein

After 202 lines it returned

svnadmin: E720059: Can't move '\oldnas\home\svn\RalfStein\db\revprops\svn-1AA28066' to '\oldnas\home\svn\RalfStein\db\revprops\203': Unerwarteter Netzwerkfehler.

("Unerwarteter Netzwerkfehler" means "unexpected network error".)

On a different nas it returned after 799 lines:

svnadmin: E720059: Can't close file '\nas\home\svn\RalfStein\db\revprops\svn-44790380': Unerwarteter Netzwerkfehler.

I've shut down the svn service, so there's no danger of someone working on svn in the meantime. Still same problem.

In don't want to use "dump" as it's not incremental. I can manually copy the entire repository and that seems to work. However, I'd like to understand where the problem is coming from.

System:


Solution

  • Note that you can consider the built-in Backup and Restore feature. It supports backup scheduling, encryption, incremental backups and backups to remote shares and Azure Files cloud. See KB106: Getting Started with Backup and Restore and KB137: Choosing backup destination.

    I want to set up an automatic incremental backup of my SVN repositories. Doing that to a local folder of the same PC seems to work, but if I try to write the files directly to a shared folder (I tried 2 different QNAP nas boxes) I get various errors, always a couple of hundred lines.

    From what I see, an unexpected network error indeed occurs when you hotcopy the repository onto your NAS. Please, double-check that you are using up-to-date Subversion command-line tools (what svnadmin --version says?).

    I've shut down the svn service, so there's no danger of someone working on svn in the meantime. Still same problem.

    You don't need to stop the server's services when you run svnadmin hotcopy:

    [[[

    This subcommand makes a “hot” backup of your repository, including all hooks, configuration files, and, of course, database files. You can run this command at any time and make a safe copy of the repository, regardless of whether other processes are using the repository.

    ]]]