The Azure Application Consistent Snapshot tool (AzAcSnap) is a command-line tool that enables data protection for third-party databases. It handles all the orchestration required to put those databases into an application-consistent state before taking a storage snapshot. After the snapshot, the tool returns the databases to an operational state.
For more information, refer to this article: https://learn.microsoft.com/en-us/azure/azure-netapp-files/azacsnap-introduction
Azure ANF azacsnap is a tool that allows you to create application-consistent snapshots of Azure NetApp Files volumes . Azure blob is a service that provides scalable, secure, and cost-effective cloud storage for unstructured data To copy the locally saved Azure ANF azacsnap to the azure blob, you can use the following steps:
- Grant read access to the snapshot using the Grant-AzSnapshotAccess cmdlet.
This will return a SAS (shared access signature) URL that can be used to access the snapshot. - Use the AzCopy tool to copy the snapshot from the SAS URL to the azure blob container. You can specify the destination blob name and the storage account name and key.
- Check the copy status using the Get-AzStorageBlobCopyState cmdlet.
Here is an example PowerShell script that performs these steps:
# Connect to Azure account
Connect-AzAccount
# Set the resource group name and the snapshot name
$ResourceGroupName=""
$snapshotName=""
# Set the SAS expiry duration in seconds
$sasExpiryDuration=3600
# Grant read access to the snapshot and get the SAS URL
$sas =Grant-AzSnapshotAccess -SnapshotName $snapshotName -ResourceGroupName $ResourceGroupName -DurationInSecond $sasExpiryDuration -Access Read
# Set the storage account name and the destination blob container name
$storageAccountName=""
$storageContainerName=""
# Create a storage context using the storage account name and key
$destinationContext = New-AzStorageContext -StorageAccountName $storageAccountName -UseConnectedAccount
# Set the destination blob file name
$destinationVHDFileName=""
# Start the blob copy using the AzCopy tool
Start-AzStorageBlobCopy -AbsoluteUri $sas.AccessSAS -DestContainer $storageContainerName -DestContext $destinationContext -DestBlob $destinationVHDFileName
# Check the copy state
Get-AzStorageBlobCopyState -Container $storageContainerName -Blob $destinationVHDFileName -Context $destinationContext
Please let us know if you have any further queries. I’m happy to assist you further.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.