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.
- 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:
- Sign in to the Azure Portal with a web browser.
- In the search box, type Storage accounts and click the Storage accounts in the search results.
- Click Add.
- 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.
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:
- Navigate to storage account created at the previous step and click Files in the Services section.
- Click the + File share button.
- 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:
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.
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.
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:
- Start VisualSVN Server Manager console.
- Right-click Jobs and click Create Backup Job. A wizard dialog opens.
- Enter the name of the new backup job and click Next.
- Select the repositories you want to backup and click Next.
- Enter the backup destination path and the credentials to the file share and click Next.
Consider to Enable backup encryption and click Next.
You can enable the encryption later in the properties of the backup
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.
- 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.
- Select the backup schedule and click Next. For more information on the backup schedule, please read the article KB109: Understanding backup job schedules.
- 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 alsoKB106: Getting Started with Backup and Restore
KB132: Understanding backup encryption