Applies to: VisualSVN Server 3.6 and older
Summary
VisualSVN Server 3.0 introduces a repository replication mechanism based on the VisualSVN Distributed File System (VDFS) technology. 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 guidance through the setup of a distributed repository in VisualSVN Server.
This article also assumes that master and slave servers reside in the same Active Directory domain or there is a trust relationship between two domains. Consider the KB120: Getting started with VDFS replication in a non-domain environment article if your servers reside in a non-trusted domains or if there is no domain at all.
Prerequisites
- All the VisualSVN Server instances to be set up as VDFS replication partners must have Enterprise Edition licenses. Feel free to request a 45-day evaluation license key.
- The VisualSVN Distributed File System Service (also referred to as VDFS service) must be started on all the replication partner computers. The service is disabled by default; it can be started from VisualSVN Server Manager by clicking Enable in the service status section of the dashboard. See KB74: Enabling and starting VDFS service article for the instructions.
- An inbound firewall rule named VisualSVN Distributed File System Service must be enabled on the computer hosting a master repository. The rule is created during the VisualSVN Server installation but not enabled by default. Refer to KB73: Enabling the inbound firewall rule for a master VDFS service article for further details.
- The slave server VDFS service accounts must be added to VisualSVN Replication Partners local user group on the master server. See KB71: Granting general access to the master server VDFS service article for further details.
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.
Create a master repository
Creating a master VDFS repository in VisualSVN Server is very similar to creating a regular, FSFS-type repository:
- In VisualSVN Server Manager right-click Repositories and choose Create New Repository. A wizard dialog opens.
- At Repository Type step select Distributed VDFS repository.
- At VDFS Repository Role step select Master repository.
- Specify a name for the new repository.
- Choose suitable settings for the repository structure and permissions. You may leave these settings at their defaults.
- At Repository Replication Permissions step grant the replication access to slave servers. By default, you should grant access to computer accounts of slave servers. See KB70: Choosing correct accounts to grant the replication access article for further details. You can skip this step and assign the required permissions later.
- Click Create and then Finish to complete the wizard.
The new master repository will become available to all 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 at Repository Structure step of the wizard and specify the path of an existing FSFS repository to import.
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 choose All Tasks | Convert to VDFS Format. The conversion operation is nearly instantaneous and reversible.
Create a slave repository
Prior to adding a slave as a partner you should go to the properties of the master repository and grant the slave VDFS service replication access on the master repository. Refer to KB69: Granting permissions to replicate a particular master repository article for a more detailed guidance. All the other prerequisites listed above in the article must be met too.
When the preparation steps on the master repository are complete, on the slave server perform the following steps:
- In VisualSVN Server Manager right-click Repositories and choose Create New Repository. A wizard dialog opens.
- At Repository Type step select Distributed VDFS repository.
- At VDFS Repository Role step select Slave repository.
- At Configure Master Repository step specify the computer name of the master server and the master repository name.
- 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.