This article is a guide on how to move your VisualSVN Server installation to a new server computer. For instance, this article can help to move VisualSVN Server from Windows Server 2008 R2 to a newer Windows version.
Preparing for migration
Preparing to migrate your VisualSVN Server, make sure to address the points below. This is essential to ensure a smooth migration process. The prerequisites are as follows:
- Plan the downtime.
- Ensure that server migration is transparent to end users.
- Verify repositories.
- Prepare to move the repository hook scripts.
Plan the downtime
The migration procedure requires you to stop VisualSVN Server services before copying repositories to a new computer. The services have to remain in the stopped state at all times while the repository migration is in progress. Plan accordingly to eliminate impact on users. It would be a good idea to copy the repositories overnight or on a weekend.
Ensure that server migration is transparent to end users
Normally, server migration is completely transparent to end users and does not require any special steps on the user end. In particular, users having uncommitted changes do not have to commit them prior to the migration and can continue working as normal.
However, note that if the URL to your server and repositories changes throughout the migration process, users will need to relocate their working copies to the new URL or checkout new working copies.
Take into account the following aspects:
- It is recommended that the URL to repositories remains unchanged. Upon the completion of the migration process, change the DNS records for the old server's name to the IP address of the new server computer.
- If you cannot keep the old server's URL, users will need to relocate their working copies or checkout new ones. Read the following articles for more information:
Verify repositories for corruptions prior to migration. This is a mandatory diagnostic measure aimed to keep unhealthy repositories away from your future environment.
Depending on the VisualSVN Server version, use one of these methods to verify the repositories:
VisualSVN Server 4.1 and later. Perform verification in one of
- Select the repository in the VisualSVN Server Manager console and click Action | All Tasks | Verify repository on the toolbar menu.
- Run the Test-SvnRepository PowerShell cmdlet.
- VisualSVN Server 3.4 and later: run the Test-SvnRepository PowerShell cmdlet.
- VisualSVN Server 3.3 and earlier: run the svnadmin verify tool in the Windows Command Prompt (cmd.exe). See the article KB13: Using Subversion command-line tools with VisualSVN Server for more information.
Note that in case of discovery of repository corruptions, it is strongly advised to restore the repository from backup before going any further. Although the corrupted repositories can be successfully moved to a new server in their current state and get restored later on, preliminary repair is far more preferable.
Reach out our support team to get additional recommendations on resolving corruption issues.
Prepare to move the repository hook scripts
You need to ensure that repository hooks will work seamlessly on a new server. In order to do so, verify that your current scripts are not linked to your old environment (i.e. do not contain absolute paths, non default environment variables, or run third-party programs). Otherwise, plan ahead on adjusting hooks and installing necessary third-party programs on a new server.
See the article KB188: Understanding Subversion repository hooks for more information.
The migration procedure involves installing VisualSVN Server on a new computer, and copying server settings and repositories to a new server computer.
Step 1. Install and configure a new server
Once you are done with the prerequisites it is time to start configuring your new machine. Follow the instructions below:
Install VisualSVN Server.
On a new server computer install exactly the same version of VisualSVN Server that was installed on your old machine. Find and download your version from the version history page.
Throughout the installation process choose the same Authentication mode that has been used on your old machine.
Move VisualSVN Server license.
If you use VisualSVN Server Enterprise Edition or run the server under Enterprise or Essential licenses you need to install this license on the new server computer. Contact our support team at email@example.com if you have lost or cannot find your license key.
If you use VisualSVN Server Standard Edition or run the server under Community license you do not need a license key to proceed.
Manually copy main VisualSVN Server settings to a new server.
Adjust VisualSVN Server settings to be the same as on the old server. You can find VisualSVN Server settings in the VisualSVN Server Manager console under Action | Properties. Follow the instructions below:
Plan on how to store the repositories on your new server computer.
To edit these settings go to the Storage tab in
VisualSVN Server Properties. Edit the Repositories Root path if you
are going to store your repositories in a non-default location.
If you are going to store your repositories on a network share, follow the steps given in the KB22: Storing repositories on a network share article to set up a new shared repository storage.TipFor better performance it is recommended to change the default location and store your repositories on a non-system volume.
Configure authentication settings to be the same as on the old server.
To edit these settings go to the Authentication
tab in VisualSVN Server Properties.
In case Windows Authentication mode was previously used on your server, make sure to choose the same authentication method. Note that Windows Authentication mode supports two different authentication methods:
- Basic authentication.
- Integrated Windows Authentication.
UPN format settings must also align with your old server settings. Use the Save Username in UPN format (user@Domain) checkbox to select an appropriate setting.
Configure network settings on the new server. To edit these
settings go to the Network tab in VisualSVN Server
Properties. Note that the Server Binding settings may be different
on the new server computer.
Make sure to select an appropriate server-side TLS/SSL compatibility level. To set a compatibility level different from default, click Change next to TLS/SSL compatibility level.
Configure the SSL certificate if you use HTTPS. To edit these
settings, go to the Certificate tab in VisualSVN Server
For more details about certificates read the article KB134: Configuring SSL Certificates for VisualSVN Server.TipIf the URL to your repositories remains unchanged after the migration, you can manually move the certificate to the new computer. That is, move the %VISUALSVN_SERVER%certs directory to the corresponding directory on the new computer. Make sure to transfer the certificate’s private key in a secure manner.
- Configure enhanced logging. To edit these settings, go to the Logging tab in VisualSVN Server Properties. Note that the Access and Operational logging is only available with the Enterprise license.
- Configure Security settings. To edit these settings go to the Security tab in VisualSVN Server Properties.
- Configure Web Interface settings. To edit these settings go to the Web Interface tab in VisualSVN Server Properties. (Settings are available starting from VisualSVN Server 3.2).
- Configure performance settings. To edit these settings go to the Performance tab in VisualSVN Server Properties. (Settings are available starting from VisualSVN Server 3.6).
- If the %VISUALSVN_SERVER%conf\httpd-custom.conf file contains customizations, examine them and move to the new server if needed. The file contains user made customizations to Apache HTTP Server packaged with VisualSVN Server.
- Plan on how to store the repositories on your new server computer. To edit these settings go to the Storage tab in VisualSVN Server Properties. Edit the Repositories Root path if you are going to store your repositories in a non-default location.
Step 2. Migrate repositories
The next step is to migrate your repositories to a new server computer. This process is pretty simple, but copy may take a considerable amount of time, during which the repositories will be inaccessible.
Stop the VisualSVN Server services on the old server computer.
Stop the VisualSVN Server services before copying the repositories. The repositories will be temporarily inaccessible starting from this point. This is a mandatory step to secure your repositories from being changed during the migration.
To stop the VisualSVN services:
- Start the VisualSVN Server Manager console.
- Click the Stop button on the toolbar.
Stop the VisualSVN Server services on the new server computer.
Repeat the procedure described in the previous step to stop the VisualSVN Server services on the new server computer.
Copy the whole repositories root directory, to the new computer. The repositories root directory is by default C:\Repositories. You can look up the location of your repositories on the Storage tab in VisualSVN Server Properties.
Completing this step ensures that you move all your repositories at once and also retain all repository user permissions.
Step 3. Verify repositories on a new server computer
Once the repositories are moved, repeat the Verify repositories step on the new server computer. This step ensures that your repositories were copied correctly, i.e. were not corrupted during the migration process.
Step 4. Start the VisualSVN Server services on the new server computer
Start the VisualSVN Server services on the new server as soon as you complete all the steps above. Note that, although your server is now running, it is not yet accessible to users giving you a possibility for a quick test drive.
Step 5. Test your new server installation
If you have transferred repository hook scripts, check them to work correctly. Pay close attention to a post-commit hook for email notifications which is a part of user-facing functionality. If your hook scripts depend on third-party products for correct execution, you should install these products now.
To access repositories hosted on the new server, make sure to use the correct URL. You can find the repository URL using VisualSVN Server Manager console:
- Start the VisualSVN Server Manager console.
- Expand Repositories node.
- Right-click a repository or repository path and click Copy URL to Clipboard.
Step 6. Configure DNS settings to point to the new server
Make necessary changes to current DNS records to point to the new server computer. Also edit the server name on the Network tab in VisualSVN Server Properties. Reach out to your system administrator for assistance if necessary.
If you wish to keep the repositories URL unchanged, make sure that the new server can be accessed using the OLD URL. Otherwise, if the repositories URL changes, do not forget to notify users as they will need to relocate their working copies or checkout new ones.
Once DNS settings are configured, your repositories become available at the specified URL.
Step 7. Upgrade your new VisualSVN Server installation to a modern version
VisualSVN Server 5.0 and older versions are no longer supported. These versions are not getting any security or server components updates and may contain critical vulnerabilities. Getting timely security improvements require that you upgrade to the latest server version which is being actively maintained. It is therefore strongly encouraged to upgrade your new VisualSVN Server installation. The KB222: Upgrading to VisualSVN Server 5.3 article provides a complete procedure including pre-upgrade and post-upgrade checklists.
Along with the enhanced security, the latest version of VisualSVN Server brings new useful features and multiple improvements. For the complete list of changes, see the VisualSVN Server changelog.
Step 8. Perform final configuration
This step describes setting up features that may not be a part of your old server configuration. Advanced features are highlighted here so you do not forget to get them reconfigured. It is therefore recommended that you go through the list below to see if any actions must be taken. However, feel free to postpone this step.
Schedule Repository Backup
This is the most important feature to be reconfigured after migration. When deploying VisualSVN Server, you need to add a scheduled backup job to ensure that your repositories are properly backed up. Read the KB106: Getting started with Backup and Restore article for setup instructions.
Schedule Repository Verification
Verifying your repositories on a regular basis is vital for early detection of repository corruptions caused by disk failures. Read the KB115: Getting started with repository verification jobs article for setup instructions.
Enable Repository Management Delegation
This feature helps you delegate user permission management duties by assigning repository supervisors. Read the KB62: Getting started with Repository Management Delegation article for setup instructions.
Enable Remote Server Administration
VisualSVN Server Manager console is implemented as a standard Microsoft Management Console (MMC) snap-in and allows you to manage multiple Subversion servers remotely from a single console. Read the KB25: Configuring Remote Administration for setup instructions.