Hi Justin Doh,
Thankyou For Reaching Microsoft Q&A!
Azure SQL Database doesn't support native .BAK file backups like on-premises SQL Server these are exclusive to SQL Server instances or Azure SQL Managed Instance. Instead, it exports to BACPAC files, which include both schema and data and work well for your client's restore needs.
Manual BACPAC Export Steps:
Log into the Azure portal, navigate to your SQL server, select the database, and click Export on the Overview page. Choose your Blob storage account/container, provide a filename (like "DB-YYYYMMDD.bacpac"), and start the process max 200GB per file.
Daily Automation (Skip ADF):
Azure Data Factory handles data copying but not BACPAC exports, so use Azure Automation Runbook instead:
text
# PowerShell in Runbook
$exportUrl = "https://yourstorage.blob.core.windows.net/container/DB-$(Get-Date -f yyyyMMdd).bacpac?SAS_TOKEN"
New-AzSqlDatabaseExport -ResourceGroupName "your-rg" -ServerName "yourserver" -DatabaseName "yourdb" -StorageKeyType "StorageAccessKey" -StorageKey "yourkey" -StorageUri $exportUrl -AdministratorLogin "admin" -AdministratorLoginPassword (ConvertTo-SecureString "pass" -AsPlainText -Force)
Schedule daily, add retention cleanup (delete files >7 days).
Quick no-code alternative: Logic Apps with Recurrence trigger > "Export Database" action > save to Blob.
Client Access & SQLPackage Option:
Share a read-only SAS token for Blob access they restore via SSMS (Databases > Tasks > Import Data-tier Application). For large DBs or more control, download SQLPackage.exe and run exports locally before uploading:
text
sqlpackage.exe /Action:Export /SourceServerName:"server.database.windows.net" /SourceDatabaseName:"db" /SourceUser:"admin" /SourcePassword:"pass" /TargetFile:"output.bacpac"
BACPACs aren't full backups (use Azure's automated ones for PITR), but perfect for external sharing. Test restores end-to-end!
I hope this helps! If you have more questions or need further assistance, feel free to ask!