VisualSVN on Windows 2012 - how to run "svnadmin hotcopy" (getting Access is Denied)

  • TheCleaner

    Following this as a guide:

    I've tried the following commmands:

    svnadmin hotcopy "C:\Repositories" > "C:\BackupSVN"
    svnadmin hotcopy "C:\Repositories\*" > "C:\BackupSVN"
    svnadmin hotcopy "C:\Repositories\TestRepo1" > "C:\BackupSVN"

    However all 3 commands result in "Access is denied"

    I've tried them at an "Administrator" command prompt as well, still the same error.


    How can I properly run an svnadmin hotcopy command (or even svnadmin dump) on a Windows 2012 server? What am I missing?

  • Answers
  • TheCleaner

    Grrr...I figured it out. Stupid default UAC on Windows 2012.

    Deactivating UAC in Windows 2008 R2 was possible via running msconfig (for example winkey+r -> msconfig), going to the Tools tab and launching "Change UAC settings". There, you select "Never notify" to disable UAC. The same approach is still available in Windows Server 2012, though UAC is still active after you selected "Never notify". You have the option to turn off UAC via registry by changing the DWORD "EnableLUA" from 1 to 0 in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system". You will get a notification that a reboot is required. After the reboot, UAC is disabled.

    UAC dialog

    UAC regedit


  • Related Question

    svn - How do you access physical VisualSVN server files?
  • Questioner

    I'm wondering how you access the physical files that have been committed to a svn repository? I set my svn repository to D:\repositories at installation and for some reason, I can't find or see any of the files. Is there something that I'm missing?

  • Related Answers
  • Mark Henderson

    An SVN repository is not stored in a standard file structure. You should see subdirectories, and inside them are more subdirectories, and inside those are checksum files, binary files, etc.

    For more information, you should refer to the Subversion Book - it has a wealth of official information.

    If you're looking to get a working copy of the subversion repository for say, running your actual website, then the easiest and safest way to do this is to do an svn checkout to a folder on your web server, and point your web server to read the website from that folder. Each time you want to update the website, do an svn update. The same principal applies for doing a daily build server (although for a build server you'll want to delete your local working copy first), and many other scenarios.

    There are Subversion plugins that will allow you to view the head revision as a physical file structure, but I'm uneasy to recommend them, because a single accidental commit will bring down your entire scenario.