Recovering files from our Azure replica
Last updated
Last updated
Retrieve the appropriate connection string from Secrets Manager; search for .
There are read-write and read-only connection strings for staging and prod; choose the read-only string.
You want everything in the URL query parameter, which is the SAS token. For example, if the URL was:
then the token is
These tokens are IP-restricted, and can only be used from the Elastic IP in the storage account.
Create an EC2 host which is behind the Elastic IP address used by the storage account. You may need to SSH through a publicly-accessible bastion host.
You can check your current IP address by running:
and you can see our Elastic IP address .
Start a Docker container running the Azure CLI:
(You may need to install Docker on the EC2 instance first.)
You can now run az storage
commands, passing the SAS token. For example, to list all the blobs in a prefix:
You can download an individual blob:
You can also download an entire directory:
(See docs for )
This may fail if a blob has already been moved to the archive tier, with the following error in the logs:
If so, you need to first. You can rehydrate a prefix with the following command:
Note: you will need the read-write SAS token for the set-tier
command.
The blobs may take up to 15 hours to hydrate, at which point you should be able to download them again.