Is is possible to replicate Azure SQL Backups to a external cloud

Kevin Schmidt 0 Reputation points
2024-05-14T21:10:30.66+00:00

I have configured backups for my Azure SQL database and I'm interested in replicating the LTR backups to an external cloud like AWS or GCP. For example, if I can configure Azure to place the LTR backups into a storage account, then I could build the replication logic. But as it stands, I can't seem to find any way to access my own backups - other than restoring them into a new Azure DB.

Azure SQL Database
{count} votes

3 answers

Sort by: Most helpful
  1. degngo 15 Reputation points
    2024-05-20T10:34:36.8866667+00:00

    Third-party tools like Avi-Point , Gs Richcopy 360 , MultiCloud, or Commvault can be used to automate the replication process directly from Azure to other clouds like AWS and GCP .

    1 person found this answer helpful.
    0 comments No comments

  2. Can Kucukgultekin 0 Reputation points
    2024-05-14T21:23:40.23+00:00

    Accessing LTR (Long-Term Retention) backups for Azure SQL Database directly isn't supported, as Azure manages these backups internally. However, there are a few strategies you can consider for replicating your Azure SQL Database backups to AWS or GCP:

    Custom Backup Solution: Implement a custom backup solution using tools like SQL Server Management Studio (SSMS) or Azure Automation to perform regular exports of your database to a .bacpac file. Store these files in an Azure Storage Account, from where they can be copied to AWS S3 or GCP Storage.

    Azure Data Factory: Use Azure Data Factory to create a pipeline that exports data from Azure SQL Database to Azure Blob Storage. From there, you can set up a process to transfer the data to AWS or GCP.

    1. Database Export via PowerShell: Use Azure PowerShell to automate the export of your database to a .bacpac file, which can then be transferred to other cloud storage solutions.

    Here’s a sample PowerShell script to export an Azure SQL Database to a .bacpac file:

    # Define parameters
    $subscriptionId = "<your_subscription_id>"
    $resourceGroupName = "<your_resource_group_name>"
    $serverName = "<your_sql_server_name>"
    $databaseName = "<your_database_name>"
    $storageAccountName = "<your_storage_account_name>"
    $storageContainerName = "<your_storage_container_name>"
    $bacpacFileName = "<your_bacpac_file_name>.bacpac"
    # Login to Azure
    Connect-AzAccount
    Set-AzContext -SubscriptionId $subscriptionId
    # Export database to bacpac file
    New-AzSqlDatabaseExport -ResourceGroupName $resourceGroupName -ServerName $serverName -DatabaseName $databaseName -StorageKeyType "StorageAccessKey" -StorageKey "<your_storage_account_key>" -StorageUri "https://$storageAccountName.blob.core.windows.net/$storageContainerName/$bacpacFileName" -AdministratorLogin "<your_admin_login>" -AdministratorLoginPassword (ConvertTo-SecureString "<your_password>" -AsPlainText -Force)
    

    After exporting the .bacpac file to Azure Blob Storage, you can configure cross-cloud replication using tools like AWS DataSync or GCP Transfer Service.

    0 comments No comments

  3. Oury Ba-MSFT 16,901 Reputation points Microsoft Employee
    2024-05-20T21:49:03.5433333+00:00

    @Kevin Schmidt Thank you for reaching out.

    As mentioned below by Can Kucukgultekin Azure doesn’t directly replicate LTR backups to AWS or GCP however you can build your own replication logic.

    You can consider a hybrid approach where you maintain a local copy of LTR backups in Azure Blob storage and replicate only essential data to the external cloud.

    Regards,

    Oury

    0 comments No comments