Hybrid Backup Strategies: On-Premise SQL + Azure Blob
By Tom Nonmacher
Hybrid backup strategies are increasingly being adopted by organizations seeking to leverage the benefits of both on-premises and cloud-based solutions. SQL Server 2016 and 2017, MySQL 5.7, DB2 11.1, and Azure SQL are some of the technologies employed in these strategies. Hybrid backup essentially involves keeping a local copy of your data while also storing a copy in the cloud. This approach provides the best of both worlds: the convenience and speed of local access, and the peace of mind provided by offsite storage.
SQL Server 2016 and 2017 have in-built features that simplify the process of creating a hybrid backup strategy. The Backup to URL feature allows DBAs to send backups directly to Azure Blob Storage. This feature can be easily configured using the SQL Server Management Studio (SSMS) or T-SQL.
-- T-SQL code for creating a backup to Azure Blob Storage
BACKUP DATABASE [YourDatabase]
TO URL = 'https://YourStorageAccount.blob.core.windows.net/YourContainer/YourDatabase.bak'
WITH CREDENTIAL = 'YourCredential'
GO
MySQL 5.7 also supports hybrid backup strategies. MySQL's mysqldump utility can be used to create backups and then these backups can be transferred to Azure Blob Storage using the Azure CLI or PowerShell. It's worth noting that while this process is a bit more manual than SQL Server's Backup to URL feature, it's still a viable option for MySQL databases.
DB2 11.1, on the other hand, doesn't have a built-in feature like SQL Server's Backup to URL. However, it is still possible to implement a hybrid backup strategy by first creating a backup using the DB2 BACKUP DATABASE command and then transferring the backup to Azure Blob Storage.
-- DB2 code for creating a backup
BACKUP DATABASE YourDatabase TO /path/to/your/backup
Azure SQL, being a cloud-based service, naturally supports storing backups in Azure Blob Storage. Backups in Azure SQL are automatically created and managed by Azure, thus reducing the administrative burden. However, there is also the option to create manual backups if needed.
In conclusion, hybrid backup strategies offer a robust solution for data protection. They combine the convenience of on-premises backups with the resilience of cloud-based backups. While the method of implementing a hybrid backup strategy can vary depending on the database technology, the end result is a more reliable and flexible backup solution.