Storing repository backups in the Azure Files cloud storage

Applies to: VisualSVN Server 3.8 and later

The Backup and Restore feature of VisualSVN Server allows you to store the repository backups on the Azure Files cloud storage. Azure Files is a secure and highly-available cloud file share accessible via the SMB 3.0 protocol. Azure Files cloud storage can be used with one-time repository backups and with scheduled backup jobs. This article focuses on setting up the scheduled backup to the file share from the ground up.

Note
Azure Files is a paid service in the Microsoft Azure cloud. You should carefully evaluate the pricing options and total costs before you start using the service to store the Subversion repository backups.

Prerequisites

  • You should have a Microsoft Azure account with a valid and active subscription.
  • The server computer should be running Windows 8 / Windows Server 2012 or later. Windows 7 and Windows Server 2008 R2 do not support SMB 3.0 protocol.
  • SMB 3.0 connectivity should be allowed on the network. SMB 3.0 uses TCP port 445 for communication.

Step 1: Create a new general-purpose storage account

You need to create a general-purpose storage account before adding a new file share. Follow these steps to create a new storage account:

  1. Sign in to the Azure Portal with a web browser.
  2. In the search box, type Storage accounts and click the Storage accounts in the search results.
  3. Click Add.
  4. Choose the required options for the new account and click Create. For explanatory reasons, we assume that the name of the new storage account is mystorageaccount.

Read the article Azure Docs | Create a storage account for the detailed instructions.

Creating the new storage account may take several minutes. You should wait until the storage account deployment succeeds and proceed to the next step.

Tip
You can leave the default options when creating a new general-purpose storage account for storing the backups. However, you may want to customize the options according to your requirements and to improve the performance or reduce the costs. For example, choose the Location closest to your VisualSVN Server installation in order to reduce the time required to create and restore the backups. For additional security, it is recommended to enable the Require secure transfer option. Read the article Azure Docs | Storage account options for more information.

Step 2: Create a file share

After the new storage account is ready, you need to add a new file share to the account. Follow these steps:

  1. Navigate to storage account created at the previous step and click Files in the Services section.
  2. Click the + File share button.
  3. Enter the name of the new file share and choose the size quota and click OK. For explanatory reasons, we assume that the name of the new fileshare is myfileshare.

Read the article Azure Docs | Create a file share in Azure Files for more information.

Step 3: Find out the file share connection details

Before you begin creating a new backup job, you should obtain the file share connection details - the UNC path to the file share and the credentials (the username and access key that is going to be used as a password).

Note that you cannot use a mounted UNC share as the backup destination location. Network shares mount per user account and are not available to the service account.

File share UNC path

Assuming that the storage account created at step 1 is named mystorageaccount and the file share created at step 2 is named myfileshare, the UNC path is as follows:

\\mystorageaccount.file.core.windows.net\myfileshare\
Tip
You can find the UNC path to the file share and the access key on the Connect pane in the Azure portal for the file share. See the screenshot in the relevant Azure Docs reference. Note that you should not mount the UNC share.

Authentication credentials

VisualSVN Server Background Job service has to authenticate to the Azure file share to be able to use it as the backup destination location. You need to find out the credentials to use when you will create a new scheduled backup job.

User name

The user name starts with Azure\ followed by your storage account name. Assuming that the storage account name created at step 1 is mystorageaccount, the user name is Azure\mystorageaccount.

Password

The password is your storage account access key. You can find the access key in the Access keys section of your storage account. Select one of the access keys available for the storage account.

Step 4: Create a new backup job

You need to create a new scheduled backup job and use the file share UNC path as the backup destination location and the storage account credentials as the user name and password.

For additional protection of your backups and the data, it is recommended to enable the backup encryption. For more information about encrypting the backups, please read the article KB132: Understanding backup encryption.

You can create a scheduled backup job by running a wizard in VisualSVN Server Manager console:

  1. Start VisualSVN Server Manager console.
  2. Right-click Jobs and click Create Backup Repository Job. A wizard dialog opens.
  3. Enter the name of the new backup job and click Next.
  4. Select the repositories you want to backup and click Next.
  5. Enter the backup destination path and the credentials to the file share and click Next.
  6. Consider to Enable backup encryption and click Next. You can enable the encryption later in the properties of the backup job.
    Note
    Remember to protect the encryption password against being lost or forgotten. VisualSVN Server does not feature any means of the emergency password recovery, and it would be impossible to restore an encrypted backup in such case.
  7. Select the backup type and click Next. For more information on the backup types, please read the article KB108: Understanding backup types in VisualSVN Server.
  8. Select the backup schedule and click Next. For more information on the backup schedule, please read the article KB109: Understanding backup job schedules.
  9. Select the backup retention policy and click Create. For more information on backup retention policy, please read the article KB110: Understanding backup retention policy.

The backup job should be successfully created after following the above steps and it will run according to the selected schedule. Note that it may take several seconds to create the backup job.

See also

KB106: Getting started with Backup and Restore
KB132: Understanding backup encryption
Last Modified: