Often customers want to backup Azure Database for MySQL to a Blob storage. mysqldumputility can't directly write the output file on a Blob Storage, in this post I will explain how this can be done usingAzure Files.
1- Navigate to your Azure Database for MySQL server on the portal and Run Azure Cloud Shell (Bash). If you run this for the first time it will ask you to create a Storage container and and this will mount an Azure File in it.
2- Typedfin the cloud shell and collect the Azure File path
3- Change directory to the cloud drive using thecdcommand in the example below I used cd /usr/bashar/clouddrive
4- Now that you are in that directory run mysqlcommand to extract the backup dump
5- Backup file is ready and in this example it is under File System "cs47e4f0dddd931x4619xbf7", navigate on the Azure Portal to that file system, as in the following screenshot.
6- Download backup file if needed or alternatively move it to Blob Storage using AzCopyutility