none
Error when using WebApp Backup feature for Azure MySQL database RRS feed

  • Question

  • Hi,

    When trying to backup Azure MYSQL using the Webapp backup feature, I've got this issue: 

    "MySql backup exited with code 2 for db:arcbrandsprod. Exception:mysqldump: [Warning] Using a password on the command line interface can be insecure." 


    Thanks for you help.

    Julien
    Friday, November 23, 2018 1:23 PM

All replies

  • Hi JTonnel,

    Are you using a MySQL instance that was provisioned as part of a Web App or are you using Azure Database for MySQL? Are you trying to import/export or take a backup?

    Backup and restore in Azure Database for MySQL

    Thanks for the clarification.

    Regards,

    Mike

    Monday, November 26, 2018 10:19 PM
    Moderator
  • Hello Mike,

    This is an Azure MySQL Database. I can connect to the databse and import/export without issues.

    I try to make a backup using the Webapp feature: 

    https://docs.microsoft.com/fr-fr/azure/app-service/web-sites-backup

    This is told that:

    "The following database solutions are supported with backup feature:

    SQL Database
    Azure Database for MySQL
    Azure Database for PostgreSQL
    MySQL in-app"

    Thanks!

    PS: Sorry for the link but the forum told me that I cannot upload pictures or put links as my profile is not verified... Strange


    • Edited by jtonnel Tuesday, November 27, 2018 1:04 PM
    Tuesday, November 27, 2018 9:57 AM
  • Hi Julien,

    Thank you for the additional detail. I have a few questions for you, from the following section: Requirements and Restrictions Exigences et Restrictions

    There are a couple conditions that are likely causing an issue:

    • Backups of SSL enabled Azure Database for MySQL is not supported. If a backup is configured, you will get failed backups. (Azure Database for MySQL defaults to SSL is enabled and needs to be disabled).
    • You need an Azure storage account and container in the same subscription as the app that you want to back up. For more information on Azure storage accounts, see the links at the end of this article.
    • Using a firewall enabled storage account as the destination for your backups is not supported. If a backup is configured, you will get failed backups.
    • The Backup and Restore feature requires the App Service plan to be in the Standard tier or Premium tier. For more information about scaling your App Service plan to use a higher tier, see Scale up an app in Azure.
      Premium tier allows a greater number of daily back ups than Standard tier.

    Also, can you please send any screen capture that details the error. You can send that to AzCommunity at Microsoft.com. I can add that to your post (simply reference this thread).

    I look forward to your response.

    Regards,

    Mike




    Tuesday, November 27, 2018 8:51 PM
    Moderator
  • Hi Mike,

    I sent the message with the screenshot. 

    All conditions you described are met:

    • The WebApp is standard tier
    • No firewall are set  on the storage account
    • SSL on Azure MySQL database is not enabled.

    For message error, see my first message.

    Thanks!

    Wednesday, November 28, 2018 8:28 AM
  • Please update this thread with the response from support. Thank you!
    Wednesday, November 28, 2018 3:49 PM
    Moderator
  • Hey Julien, 

    Did you figure out what was the problem with the backup? 

    I have same error - though I've downloaded the backup and it does contain the database .sql file along with the fs folder for the actual files.

    I have several web apps on S2 Linux plan, all running web app for containers (some wp sites, some Drupal, etc), all use the same Azure for MySQL service (different DB for each, same plan). I've then added a connection string in the application settings for each and then was able to set up the backups to include the database. Works for me, even though displays the error similar to yours.  

    Database backup logs: Sandbox error. Details: StdErr content Errors: mysqldump: [Warning] Using a password on the command line interface can be insecure.-- Connecting to

    Thursday, April 11, 2019 7:20 PM
  • Hi Serge,

    Sorry for the delay, the Azure team did not find a solution, that's disappointing... The only way I found to backup is using MySQL Workbench, but that's not what I expected, as I can't schedule neither automate backup with Workbench...

    SQL files are not complete in my case when I use the WebApp backup. Something goes wrong during backup but they can't tell me why it fails.

    Friday, May 17, 2019 1:34 PM
  • I was experiencing the same issue and finally found a solution. I tried a few things, I'm not entirely sure which one fixed it, but it did start working for me.

    1. Remove any special characters from the database password
    2. Under Configuration for the Web App, for the default connection string, make sure the username and password match what is current
    3. Make sure that there is a semicolon (;) at the end of the connection string
    4. Once done, go back to the Backups tab of the Web App and reset the configuration
    5. Redo the backup configuration

    Hopefully this works for you like it did for me!

    Thursday, July 25, 2019 5:27 PM
  • Thank you for providing an update. I did want to provide a link to the documentation detailing this functionality: Back up your app in Azure (link)

    Specifically, there are some nuances around this functionality as detailed here:

    • The Backup and Restore feature requires the App Service plan to be in the Standard tier or Premium tier. For more information about scaling your App Service plan to use a higher tier, see Scale up an app in Azure.
    • Premium tier allows a greater number of daily back ups than Standard tier.
      You need an Azure storage account and container in the same subscription as the app that you want to back up. For more information on Azure storage accounts, see Azure storage account overview.
    • Backups can be up to 10 GB of app and database content. If the backup size exceeds this limit, you get an error.
    • Backups of SSL enabled Azure Database for MySQL is not supported. If a backup is configured, you will get failed backups.
    • Backups of SSL enabled Azure Database for PostgreSQL is not supported. If a backup is configured, you will get failed backups.
    • In-app MySQL databases are automatically backed up without any configuration. If you make manually settings for in-app MySQL databases, such as adding connection strings, the backups may not work correctly.
    • Using a firewall enabled storage account as the destination for your backups is not supported. If a backup is configured, you will get failed backups.

    Please note the enablement of SSL will break the backup process.

    Regards,

    Mike


    Friday, July 26, 2019 4:49 PM
    Moderator