Blob Storage Backups
Learn how to back up your Umbraco Cloud Blob Storage using AzCopy.
Umbraco Cloud uses Azure Blob Storage to store all media files for your project. This includes images, PDFs, and other files added through the Media library in the Umbraco backoffice.
While Umbraco Cloud provides database backups through the Cloud Portal, you may want to create your own backups of the Blob Storage. This article describes how to back up and restore Blob Storage using AzCopy.
Prerequisites
A project on Umbraco Cloud with access to the Cloud Portal.
AzCopy is installed on your local machine.
Access to the Connections page under Configuration in the Cloud Portal.
Download AzCopy
Download the AzCopy portable binary from the official Microsoft AzCopy page.
Extract the binary to a directory on your local machine.
Verify that AzCopy runs from the command line by running:
azcopy --versionLocate the Shared Access Signature (SAS) URL
Go to the Umbraco Cloud Portal for your project.
Open the Connections page found under Configuration.
Locate the Blob Storage SAS URL for the environment you want to back up.
Back Up Blob Storage to a Local Directory
Use the following AzCopy command to download the Blob Storage contents to a local directory:
Replace
<SAS-URL>with the Blob Storage SAS URL from the Connections page.Replace
C:\BlobBackupwith the path to the local directory where you want to store the backup.The
--recursiveflag ensures that all files and subdirectories are copied.
Verify the Backup
List the files in your Blob Storage container using the following command:
Compare the output with the contents of your local backup directory to confirm that all files have been downloaded.
Back Up Blob Storage to Another Storage Account
You can also copy the Blob Storage contents to another Azure Storage account. Use the following command:
Replace
<Source-SAS-URL>with the SAS URL of the source Blob Storage container.Replace
<Destination-SAS-URL>with the SAS URL of the destination container.The
--recursiveflag ensures that all files and subdirectories are copied.
Restore Blob Storage from a Local Backup
If you need to restore the Blob Storage from a local backup, use the following command:
Replace
C:\BlobBackupwith the path to your local backup directory.Replace
<SAS-URL>with the Blob Storage SAS URL for the target environment.The
--recursiveflag ensures that all files and subdirectories are uploaded.
Related Articles
Last updated
Was this helpful?