You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/files/storage-files-how-to-mount-nfs-shares.md
+1-175Lines changed: 1 addition & 175 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,181 +109,7 @@ If your mount fails, it's possible that your private endpoint wasn't set up corr
109
109
110
110
## NFS file share snapshots
111
111
112
-
Customers using NFS Azure file shares can create, list, and delete NFS Azure file share snapshots. This capability allows users to roll back entire file systems or recover files that were accidentally deleted or corrupted.
113
-
114
-
> [!IMPORTANT]
115
-
> You should mount your file share before creating snapshots. If you create a new NFS file share and take snapshots before mounting the share, attempting to list the snapshots for the share will return an empty list. We recommend deleting any snapshots taken before the first mount and re-creating them after you've mounted the share.
116
-
117
-
### Limitations
118
-
119
-
Only file management APIs (`AzRmStorageShare`) are supported for NFS Azure file share snapshots. File data plane APIs (`AzStorageShare`) aren't supported.
120
-
121
-
Azure Backup isn't currently supported for NFS file shares.
122
-
123
-
AzCopy isn't currently supported for NFS file shares. To copy data from an NFS Azure file share or share snapshot, use file system copy tools such as rsync or fpsync.
124
-
125
-
NFS Azure file share snapshots are available in all Azure public cloud regions.
126
-
127
-
### Create a snapshot
128
-
129
-
You can create a snapshot of an NFS Azure file share using the Azure portal, Azure PowerShell, or Azure CLI. A share can support the creation of up to 200 share snapshots.
130
-
131
-
# [Azure portal](#tab/portal)
132
-
133
-
To create a snapshot of an existing file share, sign in to the Azure portal and follow these steps.
134
-
135
-
1. In the search box at the top of the Azure portal, type and select *storage accounts*.
136
-
137
-
1. Select the FileStorage storage account that contains the NFS Azure file share that you want to take a snapshot of.
138
-
139
-
1. Select **Data storage** > **File shares**.
140
-
141
-
1. Select the file share that you want to snapshot, then select **Operations** > **Snapshots**.
142
-
143
-
1. Select **+ Add snapshot**. Add an optional comment, and select **OK**.
144
-
145
-
:::image type="content" source="media/storage-files-how-to-mount-nfs-shares/add-file-share-snapshot.png" alt-text="Screenshot of adding a file share snapshot.":::
146
-
147
-
# [Azure PowerShell](#tab/powershell)
148
-
149
-
To create a snapshot of an existing file share, run the following PowerShell command. Replace `<resource-group-name>`, `<storage-account-name>`, and `<file-share-name>` with your own values.
To create a snapshot of an existing file share, run the following Azure CLI command. Replace `<file-share-name>` and `<storage-account-name>` with your own values.
157
-
158
-
```azurecli
159
-
az storage share snapshot --name <file-share-name> --account-name <storage-account-name>
160
-
```
161
-
---
162
-
163
-
### List file share snapshots
164
-
165
-
You can list all the snapshots for a file share using the Azure portal, Azure PowerShell, or Azure CLI.
166
-
167
-
# [Azure portal](#tab/portal)
168
-
169
-
To list all the snapshots for an existing file share, sign in to the Azure portal and follow these steps.
170
-
171
-
1. In the search box at the top of the Azure portal, type and select *storage accounts*.
172
-
173
-
1. Select the FileStorage storage account that contains the NFS Azure file share that you want to list the snapshots of.
174
-
175
-
1. Select **Data storage** > **File shares**.
176
-
177
-
1. Select the file share for which you want to list the snapshots.
178
-
179
-
1. Select **Operations** > **Snapshots**, and any existing snapshots for the file share will be listed.
180
-
181
-
# [Azure PowerShell](#tab/powershell)
182
-
183
-
To list all file shares and snapshots in a storage account, run the following PowerShell command. Replace `<resource-group-name>` and `<storage-account-name>` with your own values.
To list all file shares and snapshots in a storage account, run the following Azure CLI command. Replace `<storage-account-name>` with your own value.
191
-
192
-
```azurecli
193
-
az storage share list --account-name <storage-account-name> --include-snapshots
194
-
```
195
-
---
196
-
197
-
### Delete snapshots
198
-
199
-
Existing share snapshots are never overwritten. They must be deleted explicitly. You can delete share snapshots using the Azure portal, Azure PowerShell, or Azure CLI.
200
-
201
-
# [Azure portal](#tab/portal)
202
-
203
-
To delete a snapshot of an existing file share, sign in to the Azure portal and follow these steps.
204
-
205
-
1. In the search box at the top of the Azure portal, type and select *storage accounts*.
206
-
207
-
1. Select the FileStorage storage account that contains the NFS Azure file share for which you want to delete snapshots.
208
-
209
-
1. Select **Data storage** > **File shares**.
210
-
211
-
1. Select the file share for which you want to delete one or more snapshots, then select **Operations** > **Snapshots**. Any existing snapshots for the file share will be listed.
212
-
213
-
1. Select the snapshot(s) that you want to delete, and then select **Delete**.
214
-
215
-
:::image type="content" source="media/storage-files-how-to-mount-nfs-shares/delete-file-share-snapshot.png" alt-text="Screenshot of deleting file share snapshots.":::
216
-
217
-
# [Azure PowerShell](#tab/powershell)
218
-
219
-
To delete a file share snapshot, run the following PowerShell command. Replace `<resource-group-name>`, `<storage-account-name>`, and `<file-share-name>` with your own values. The `SnapshotTime` parameter must follow the correct name format, such as `2021-05-10T08:04:08Z`.
To delete a file share and all its snapshots, run the following PowerShell command. Replace `<resource-group-name>`, `<storage-account-name>`, and `<file-share-name>` with your own values.
To delete a file share snapshot, run the following Azure CLI command. Replace `<storage-account-name>` and `<file-share-name>` with your own values. The `--snapshot` parameter must follow the correct name format, such as `2021-05-10T08:04:08Z`.
234
-
235
-
```azurecli
236
-
az storage share delete --account-name <storage-account-name> --name <file-share-name> --snapshot <snapshot-time>
237
-
```
238
-
239
-
To delete a file share and all its snapshots, run the following Azure CLI command. Replace `<storage-account-name>` and `<file-share-name>` with your own values.
240
-
241
-
```azurecli
242
-
az storage share delete --account-name <storage-account-name> --name <file-share-name> --delete-snapshots include
243
-
```
244
-
---
245
-
246
-
### Mount an NFS Azure file share snapshot
247
-
248
-
To mount an NFS Azure file share snapshot to a Linux VM (NFS client) and restore files, follow these steps.
249
-
250
-
1. Run the following command in a console. See [Mount options](#mount-options) for other recommended mount options. To improve copy performance, mount the snapshot with [nconnect](nfs-performance.md#nconnect) to use multiple TCP channels.
251
-
252
-
```bash
253
-
sudo mount -o vers=4,minorversion=1,proto=tcp,sec=sys $server:/nfs4account/share /media/nfs
254
-
```
255
-
256
-
1. Change the directory to `/media/nfs/.snapshots` so you can view the available snapshots. The `.snapshots` directory is hidden by default, but you can access and read from it like any directory.
257
-
258
-
```bash
259
-
cd /media/nfs/.snapshots
260
-
```
261
-
262
-
1. List the contents of the `.snapshots` folder.
263
-
264
-
```bash
265
-
ls
266
-
```
267
-
268
-
1. Each snapshot has its own directory that serves as a recovery point. Change to the snapshot directory for which you want to restore files.
269
-
270
-
```bash
271
-
cd<snapshot-name>
272
-
```
273
-
274
-
1. List the contents of the directory to view a list of files and directories that can be recovered.
275
-
276
-
```bash
277
-
ls
278
-
```
279
-
280
-
1. Copy all files and directories from the snapshot to a *restore* directory to complete the restore.
281
-
282
-
```bash
283
-
cp -r <snapshot-name> ../restore
284
-
```
285
-
286
-
The files and directories from the snapshot should now be available in the `/media/nfs/restore` directory.
112
+
Customers using NFS Azure file shares can create, list, and delete file share snapshots. This capability allows users to roll back entire file systems or recover files that were accidentally deleted or corrupted. See [Use share snapshots with Azure Files](storage-snapshots-files.md#nfs-file-share-snapshots).
If you've taken a share snapshot, either manually or automatically through a script or service like Azure Backup, you can view previous versions of a share, a directory, or a particular file from a file share on Windows. You can take a share snapshot using the [Azure portal](storage-files-quick-create-use-windows.md#create-a-share-snapshot), [Azure PowerShell](/powershell/module/az.storage/new-azrmstorageshare), or [Azure CLI](/cli/azure/storage/share#az-storage-share-snapshot).
140
-
141
-
#### List previous versions
142
-
143
-
Browse to the item or parent item that needs to be restored. Double-click to go to the desired directory. Right-click and select **Properties** from the menu.
144
-
145
-

146
-
147
-
Select **Previous Versions** to see the list of share snapshots for this directory. The list might take a few seconds to load, depending on the network speed and the number of share snapshots in the directory.
Select **Restore** to copy the contents of the entire directory recursively at the share snapshot creation time to the original location.
158
-
159
-

160
-
161
137
## Enable SMB Multichannel
162
138
163
139
Support for SMB Multichannel in Azure Files requires ensuring Windows has all the relevant patches applied. Several older Windows versions, including Windows Server 2016, Windows 10 version 1607, and Windows 10 version 1507, require additional registry keys to be set for all relevant SMB Multichannel fixes to be applied on fully patched installations. If you're running a version of Windows that's newer than these three versions, no additional action is required.
0 commit comments