Create and Restore File Share Snapshots in Azure

Jubril EdunJubril Edun
2 min read

In this simple hands-on lab, we’ll be creating a snapshot of our file share and restoring it to our virtual machine. Snapshots allow you to capture the state of your data at a particular point in time. If data is accidentally deleted or corrupted, you can restore it from a snapshot.

Definitions

Azure Storage account: Azure Storage Account is a storage account that is a resource that acts as a container that groups all the data services from Azure storage (Azure blobs, Azure files, Azure Queues, and Azure Tables). It provides a unique namespace for your Azure Storage data that's accessible from anywhere in the world over HTTP or HTTPS.

Azure Files: Azure Files offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (SMB) protocol, Network File System (NFS) protocol, and Azure Files REST API. Azure file shares can be mounted concurrently by cloud or on-premises deployments

Azure Bastion: Azure Bastion is a fully managed service that provides secure and seamless Remote Desktop Protocol (RDP) and Secure Shell Protocol (SSH) access to virtual machines (VMs) without any exposure through public IP addresses.

Steps

Create a storage account

Create a file share

Connect to our Virtual machine using Azure Bastion to enable access to the file share

Successful connection to the virtual machine using Azure bastion

Navigate to the file share we created and grab the file share script. The file share script will be used to mount the file share on the Virtual Machine. Copy and paste the script in to the VM powershell window

The script is testing connection from the VM to the fileshare using the fileshare url, the storage account name and the storage account key. After successful connection, the script mounts the file share as a persistent storage drive

Fileshare successfully mounted in the Z drive

Create a test document on the virtual machine

Confirm the document is automatically created in Azure file share

Creating a snapshot of the document in file share

Edit the document in the VM to test the snapshot

Restore the file from the snapshot file share

Confirm the file has been restored to the previous version

Voila! QED!

0
Subscribe to my newsletter

Read articles from Jubril Edun directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jubril Edun
Jubril Edun

Hi there, My name is Jubril Edun, a tech enthusiast who is on a learning journey into the world of Cloud Engineering, Cybersecurity and beyond. Join me as I document my learning journey.