Skip to content

Commit 7d0622a

Browse files
authored
Merge pull request #250224 from AbhishekMallick-MS/Sep-4-2023-SQLbackup
Configure backup for SQL
2 parents a11286f + 6556f1f commit 7d0622a

File tree

1 file changed

+63
-3
lines changed

1 file changed

+63
-3
lines changed

articles/backup/backup-azure-sql-database.md

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Back up SQL Server databases to Azure
33
description: This article explains how to back up SQL Server to Azure. The article also explains SQL Server recovery.
44
ms.topic: conceptual
5-
ms.date: 08/11/2022
5+
ms.date: 09/06/2023
66
author: AbhishekMallick-MS
77
ms.author: v-abhmallick
88
---
@@ -13,7 +13,7 @@ ms.author: v-abhmallick
1313
1. Workload aware backups that support all backup types - full, differential, and log
1414
2. 15 minute RPO (recovery point objective) with frequent log backups
1515
3. Point-in-time recovery up to a second
16-
4. Individual database level backup and restore
16+
4. Individual database level back up and restore
1717

1818
>[!Note]
1919
>Snapshot-based backup for SQL databases in Azure VM is now in preview. This unique offering combines the goodness of snapshots, leading to a better RTO and low impact on the server along with the benefits of frequent log backups for low RPO. For any queries/access, write to us at [[email protected]](mailto:[email protected]).
@@ -112,7 +112,7 @@ Add **NT AUTHORITY\SYSTEM** and **NT Service\AzureWLBackupPluginSvc** logins to
112112

113113
![Rediscover DBs in Azure portal](media/backup-azure-sql-database/sql-rediscover-dbs.png)
114114

115-
Alternatively, you can automate giving the permissions by running the following PowerShell commands in admin mode. The instance name is set to MSSQLSERVER by default. Change the instance name argument in script if need be:
115+
Alternatively, you can automate giving the permissions by running the following PowerShell commands in admin mode. The instance name is set to MSSQLSERVER by default. Change the instance name argument in script if needed.
116116

117117
```powershell
118118
param(
@@ -147,6 +147,66 @@ catch
147147
}
148148
```
149149

150+
## Configure simultaneous backups
151+
152+
You can now configure backups to save the SQL server recovery points and logs in a local storage and Recovery Services vault simultaneously.
153+
154+
To configure simultaneous backups, follow these steps:
155+
156+
1. Go to the `C:\Program Files\Azure Workload Backup\bin\plugins` location, and then create the file **PluginConfigSettings.json**, if it's not present.
157+
2. Add the comma separated key value entities, with keys `EnableLocalDiskBackupForBackupTypes` and `LocalDiskBackupFolderPath` to the JSON file.
158+
159+
- Under `EnableLocalDiskBackupForBackupTypes`, list the backup types that you want to store locally.
160+
161+
For example, if you want to store the *Full* and *Log* backups, mention `[“Full”, “Log”]`. To store only the log backups, mention `[“Log”]`.
162+
163+
- Under `LocalDiskBackupFolderPath`, mention the *path to the local folder*. Ensure that you use the *double forward slash* while mentioning the path in the JSON file.
164+
165+
For example, if the preferred path for local backup is `E:\LocalBackup`, mention the path in JSON as `E:\\LocalBackup`.
166+
167+
The final JSON should appear as:
168+
169+
```JSON
170+
{
171+
"EnableLocalDiskBackupForBackupTypes": [“Log”],
172+
"LocalDiskBackupFolderPath": “E:\\LocalBackup”,
173+
}
174+
175+
```
176+
177+
If there are other pre-populated entries in the JSON file, add the above two entries at the bottom of the JSON file *just before the closing curly bracket*.
178+
179+
3. For the changes to take effect immediately instead of regular one hour, go to **TaskManager** > **Services**, right-click **AzureWLbackupPluginSvc** and select **Stop**.
180+
181+
>[!Caution]
182+
>This action will cancel all the ongoing backup jobs.
183+
184+
The naming convention of the stored backup file and the folder structure for it will be `{LocalDiskBackupFolderPath}\{SQLInstanceName}\{DatabaseName}`.
185+
186+
For example, if you have a database `Contoso` under the SQL instance `MSSQLSERVER`, the files will be located at in `E:\LocalBackup\MSSQLSERVER\Contoso`.
187+
188+
The name of the file is the `VDI device set guid`, which is used for the backup operation.
189+
190+
4. Check if the target location under `LocalDiskBackupFolderPath` has *read* and *write* permissions for `NT Service\AzureWLBackupPluginSvc`.
191+
192+
>[!Note]
193+
>For a folder on the local VM disks, right-click the folder and configure the required permissions for `NT Service\AzureWLBackupPluginSvc` on the **Security** tab.
194+
195+
If you're using a network or SMB share, configure the permissions by running the below PowerShell cmdlets from a user console that already has the permission to access the share:
196+
197+
```azurepowershell
198+
$cred = Get-Credential
199+
New-SmbGlobalMapping -RemotePath <FileSharePath> -Credential $cred -LocalPath <LocalDrive>: -FullAccess @(“<Comma Separated list of accounts>”) -Persistent $true
200+
201+
```
202+
203+
**Example**:
204+
205+
```azurepowershell
206+
$cred = Get-Credential
207+
New-SmbGlobalMapping -RemotePath \\i00601p1imsa01.file.core.windows.net\rsvshare -Credential $cred -LocalPath Y: -FullAccess @("NT AUTHORITY\SYSTEM","NT Service\AzureWLBackupPluginSvc") -Persistent $true
208+
```
209+
150210
## Next steps
151211
152212
* [Learn about](backup-sql-server-database-azure-vms.md) backing up SQL Server databases.

0 commit comments

Comments
 (0)