Applies to: VisualSVN Server 3.7 and later

Note
Note If you use VisualSVN Server 3.6 or older, please consider a previous version of the article KB68: Getting started with VDFS replication in an Active Directory environment.

Multisite Repository Replication feature is based on the VisualSVN Distributed File System (VDFS). Geared towards geographically distributed networks, the repository replication feature enables development teams from remote locations to work with the repositories at LAN speeds. To any Subversion client software each VDFS repository is a fully functional, writable Subversion repository. This article introduces some key VDFS concepts and deployment prerequisites, as well as provides a step-by-step instructions for configuring the VDFS replication across servers that reside in the same Active Directory domain or trusted domains.

Key concepts

  • From the Subversion client software standpoint, each VDFS repository — regardless of its master or slave role — looks and acts just like a regular writable Subversion repository. The replication is performed automatically and transparently.
  • A VDFS repository can be created as either a master or a slave, not both.
  • The terms master repository and slave repository refer to VDFS roles that govern the under-the-hood behavior of the replication mechanism. To Subversion clients each VDFS repository is always exposed as a standard Subversion repository.

Assumptions

For explanatory reasons, we will assume the following:

  • There are two instances of VisualSVN Server Enterprise Edition installed on the following servers in the example.com domain:
    • Berlin-SVN.example.com. Master repository will be hosted here and we refer to this server as to the master server.
    • NY-SVN.example.com. Slave repository will be hosted here and we will refer to this server as to the slave server.
  • Both VDFS services are running under built-in Network Service account.
  • Both VisualSVN Server instances reside in the same Active Directory domain. Consider the KB120: Getting Started with VDFS replication in a non-domain environment article if you plan to deploy the replication on non-domain computer or in domains without trust relationship.

Prerequisites

Before deploying VDFS replication, please ensure that the following prerequisites are met:

  • All the VisualSVN Server instances must be at the same server version of 3.7 or newer. You may see the instruction that applies to older versions in the article KB68.
  • All the VisualSVN Server instances must have Enterprise Edition licenses. Feel free to request a 45-day evaluation license key.

Step 1: Enable VDFS service on master and slave servers

The VisualSVN Distributed File System Service (also referred to as VDFS service) must be started on all the VisualSVN Server instances. The service is disabled by default. It can be enabled and started from the VisualSVN Server Manager by clicking the Enable link in the service status section of the dashboard. See the article KB74: Enabling and starting VDFS service for further details.

Step 2: Enable VDFS firewall rule on master server

An inbound firewall rule named VisualSVN Distributed File System Service must be enabled on the master server. The rule is created during the VisualSVN Server installation but it is not enabled by default. See the article KB73: Enabling the inbound firewall rule for a master VDFS service for further details.

Step 3: Authorize the slave server to connect to the master server

The slave server should be authorized to connect to the master server. Follow these steps to add the slave server into the list of authorized replication partners:

  1. Start VisualSVN Server Manager console on the master Berlin-SVN server.
  2. Click Action | Properties and click the Replication tab.
  3. Click Add menu-button and then select the Add server authenticated by Active Directory command.
  4. Add the computer account NY-SVN$. Click OK.
    Note
    Note Read the article KB70: Choosing correct accounts to grant the replication access for additional details.

Note that this step authorizes slave server’s access to the local VDFS service, but not to the individual master repositories. Access to the particular master repository will be granted on the next step.

Step 4: Create a master repository

Creating a master VDFS repository in VisualSVN Server is very similar to creating a regular, FSFS-type repository. Follow these steps to create a new VDFS master repository:

  1. Start VisualSVN Server Manager console on the master Berlin-SVN server.
  2. Right-click Repositories and click Create New Repository. A wizard dialog opens.
  3. Select Distributed VDFS repository and click Next.
  4. Select Master repository and click Next.
  5. Enter MyRepo as a name of the new master repository and click Next.
  6. Choose suitable settings for the repository structure. You may leave these settings at their defaults. Click Next.
  7. Choose suitable settings for the repository permissions. You may leave these settings at their defaults. Click Next.
  8. Grant the replication access to slave servers. Click Add menu-button and then select the Add server authenticated by Active Directory command.
  9. Add the computer account NY-SVN$. Click OK.
  10. Click Create and then Finish to complete the wizard.

The new master repository will become available to all Subversion clients just like any other regular Subversion repository.

Instead of creating an empty repository, you may choose to populate it with data from an existing one. Simply select Import data from existing repository and specify the path of an existing FSFS repository to import.

Tip
Tip Existing FSFS repositories can also be converted to the VDFS format. To perform an in-place conversion of a repository, first stop VisualSVN Server services. Then right-click the repository name and click All Tasks | Convert to VDFS Format. The conversion operation is nearly instantaneous and reversible.

Step 5: Create a slave repository

When all the above steps are complete, you are ready to create a new slave VDFS repository:

  1. Start VisualSVN Server Manager console on the slave NY-SVN server.
  2. Right-click Repositories and click Create New Repository. A wizard dialog opens.
  3. Select Distributed VDFS repository and click Next.
  4. Select Slave repository and click Next.
  5. On the Master Repository Connection Details page perform the steps below:
    1. Enter Berlin-SVN.example.com as the Master server name.
    2. Enter MyRepo as the Master repository name.
    3. Make sure, that Active Directory is selected as the authentication method.
  6. After you click Create, the new slave repository will be created and an initial sync with the master repository will start in the background.

The initial sync of a large repository may take time. During this period the slave repository will be valid and available but out-of-date. An alternative approach that works faster for huge repositories (or in environments with relatively low network bandwidths) is to deploy the slave repository using a replication seed. For additional details see the article KB101: Deploying VDFS slave repositories using replication seeds.

See also

KB101: Deploying VDFS slave repositories using replication seeds
KB118: Understanding the VDFS replication settings
KB120: Getting Started with VDFS replication in a non-domain environment
Last Modified: