Termination of Azure Service

jb_devel 100 Reputation points
2025-01-24T01:08:49.3266667+00:00

Hello,

Were planning to cut cost in our Azure Cloud Infrastructure and we noticed that we have Azure Database for MySQL flexible server that is not being used or the project for it, halted.

We want the service be terminated and removed however we also want to make sure that if needed, we can still recreate the service back to its original state.

I am writing this because our Cloud develop partner left us without proper documentation and know-how-transfer and we have limited knowledge regarding cloud management.

My question is how can we terminate the service without incurring some cost and make sure it will not bill us anymore and most importantly bring back the terminated service to its original state if we decide to continue the project?

Thank you.

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
889 questions
{count} votes

Accepted answer
  1. Sina Salam 17,016 Reputation points
    2025-01-24T15:58:41.9033333+00:00

    Hello jb_devel,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your concern and questions on termination of Azure service in your Azure Cloud Infrastructure.

    The below solution will help you to terminate Azure services and to:

    • Complete elimination of ongoing costs for the unused database.
    • Guaranteed ability to recreate the database in its original state, with all configurations intact.
    • Mitigation of backup retention risks by exporting data to long-term, low-cost storage.

    The first thing is to export your Data for Long-Term Recovery with the below options:

    Option 1: Export to SQL Dump or BACPAC:

    • Use tools like Azure Data Studio or mysqldump to export the database to a local system or Azure Blob Storage. This is an example for mysqldump using bash command: mysqldump -u <username> -h <server-name>.mysql.database.azure.com -p <database-name> > backup.sql
    • Save the file in a secure location.

    Option 2: Export Backups to Azure Blob Storage:

    • Enable Azure Storage Blob and move the backups there to retain them for as long as needed.

    Secondly, document your server configurations:

    • Use Azure Resource Manager (ARM) templates or Terraform scripts to export the current configuration of the Azure Database for MySQL flexible server:
    • In the Azure portal, navigate to the server's Export Template section.
    • Save the ARM template locally. This will allow you to recreate the service with the same configurations (e.g., server size, region, network settings).

    This is your third category of things to do by "Terminate the Service":

    • Temporarily halts the server to stop billing for compute resources by "Stop the Server".
    • Delete the server and confirm deletion to avoid incurring storage and management costs.

    NOTE:

    1. To ensure minimal backup costs: Move Backups to Archive Storage to reduce costs, by transferring backups to the archive tier in Azure Blob Storage, which is significantly cheaper.
    2. For the future reusability, use the saved database dump or BACPAC file to restore the database on a new MySQL server if needed and reuse the ARM template or Terraform script to replicate the original server configuration.
    3. To put into considerations the cost, Azure Blob Storage (Archive tier) costs less than $0.001 per GB/month, making it a cost-effective option for long-term storage and recreating the service will incur standard provisioning costs based on the chosen server configuration.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.