Skip to content

Commit 6290854

Browse files
Add samples for snapshots and versions
1 parent d2d1f32 commit 6290854

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed

articles/storage/blobs/snapshots-manage-dotnet.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Create and manage a blob snapshot in .NET
2+
title: Create and manage a blob snapshot with .NET
33
titleSuffix: Azure Storage
44
description: Learn how to use the .NET client library to create a read-only snapshot of a blob to back up blob data at a given moment in time.
55
author: pauljewellmsft
@@ -10,10 +10,10 @@ ms.topic: how-to
1010
ms.date: 08/27/2020
1111
ms.subservice: blobs
1212
ms.devlang: csharp
13-
ms.custom: devx-track-csharp
13+
ms.custom: devx-track-csharp, devguide-csharp
1414
---
1515

16-
# Create and manage a blob snapshot in .NET
16+
# Create and manage a blob snapshot with .NET
1717

1818
A snapshot is a read-only version of a blob that's taken at a point in time. This article shows how to create and manage blob snapshots using the [Azure Storage client library for .NET](/dotnet/api/overview/azure/storage).
1919

@@ -89,12 +89,24 @@ The following code example shows how to delete a blob and its snapshots in .NET,
8989
await blobClient.DeleteIfExistsAsync(DeleteSnapshotsOption.IncludeSnapshots, null, default);
9090
```
9191

92-
## Next steps
92+
## Copy a blob snapshot over the base blob
9393

94-
- [Blob snapshots](snapshots-overview.md)
95-
- [Blob versions](versioning-overview.md)
96-
- [Soft delete for blobs](./soft-delete-blob-overview.md)
94+
You can perform a copy operation to promote a snapshot over its base blob, as long as the base blob is in an online tier (hot or cool). The snapshot remains, but its destination is overwritten with a copy that can be read and written to.
95+
96+
The following code example shows how to copy a blob snapshot over the base blob:
97+
98+
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/BlobDevGuideBlobs/CopySnapshot.cs" id="Snippet_CopySnapshot":::
9799

98100
## Resources
99101

100-
For related code samples using deprecated .NET version 11.x SDKs, see [Code samples using .NET version 11.x](blob-v11-samples-dotnet.md#create-a-snapshot).
102+
To learn more about managing blob snapshots using the Azure Blob Storage client library for .NET, see the following resources.
103+
104+
For related code samples using deprecated .NET version 11.x SDKs, see [Code samples using .NET version 11.x](blob-v11-samples-dotnet.md#create-a-snapshot).
105+
106+
[!INCLUDE [storage-dev-guide-resources-dotnet](../../../includes/storage-dev-guides/storage-dev-guide-resources-dotnet.md)]
107+
108+
### See also
109+
110+
- [Blob snapshots](snapshots-overview.md)
111+
- [Blob versions](versioning-overview.md)
112+
- [Soft delete for blobs](./soft-delete-blob-overview.md)

articles/storage/blobs/versions-manage-dotnet.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,21 @@ The following code example shows how to list blob versions.
3535

3636
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/dotnet-v12/CRUD.cs" id="Snippet_ListBlobVersions":::
3737

38-
## See also
38+
## Copy a previous blob version over the base blob
39+
40+
You can perform a copy operation to promote a version over its base blob, as long as the base blob is in an online tier (hot or cool). The version remains, but its destination is overwritten with a copy that can be read and written to.
41+
42+
The following code example shows how to copy a blob version over the base blob:
43+
44+
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/BlobDevGuideBlobs/CopyVersion.cs" id="Snippet_CopyVersion":::
45+
46+
## Resources
47+
48+
To learn more about managing blob versions using the Azure Blob Storage client library for .NET, see the following resources.
49+
50+
[!INCLUDE [storage-dev-guide-resources-dotnet](../../../includes/storage-dev-guides/storage-dev-guide-resources-dotnet.md)]
51+
52+
### See also
3953

4054
- [Blob versioning](versioning-overview.md)
4155
- [Enable and manage blob versioning](versioning-enable.md)

0 commit comments

Comments
 (0)