Reputation: 1
I am trying to find a way to automate the backup of an Azure DNS Zone.
The following command allows me to backup the zone to a file on a local machine, but I would ideally like to backup up azure storage (blob).
az network dns zone export -g resourcegroup -n dnszone.co.uk -f output.txt https://learn.microsoft.com/en-us/azure/dns/dns-import-export
I have tried using the above with the 'az storage blob upload' command but with no joy. Maybe im on the wrong track
Upvotes: 0
Views: 4754
Reputation: 28224
As your requirement, you can follow these steps to upload your DNS zone file to Azure storage account.
Export the DNS zone file using this Azure CLI command:
az network dns zone export -g myresourcegroup -n contoso.com -f /path/to/zonefile.txt
Upload the exported DNS zone file to Azure blob storage using this Azure CLI command:
az storage blob upload -f /path/to/file -c MyContainer -n MyBlob --account-name xxxx --account-key xxxx
If you have any question, please let me know.
Upvotes: 0