This page looks best with JavaScript enabled

Backup database run inside Azure Kubernetes Service with Azure Backup vault

 ·  ☕ 4 min read  ·  👽 Nhat Le

In the previous section I used kubernetes cronjob to do back up by schedule. It has certain pros and cons. You can read here Backup database run inside Azure Kubernetes Service with Kubernetes cronjob

Scenario

  • You are using kubernetes, here is Azure Kubernetes Service (AKS)
  • Deploy database, such as mongodb, elasticsearch,…
  • Containerized applications running on Azure Kubernetes Service (AKS cluster) are using managed disks as persistent storage
  • You need to back up data but you want an easy solution, centralized management place,not using scripting.

Azure Disk Backup

  • Azure Disk Backup offers a solution that provides snapshot lifecycle management for managed disks by automating periodic creation of snapshots and retaining it for configured duration using backup policy.
  • You can manage the disk snapshots without the need for custom scripting or any management overhead.
  • This backup solution that takes point-in-time backup of a managed disk using incremental snapshots with support for multiple backups per day.
  • It supports backup and restore of both OS and data disks (including shared disks), whether or not they’re currently attached to a running Azure virtual machine.

So we know the benefit of Azure Disk Backup, but how to we implement it?

  • That is Backup vault. The vault gives you a consolidated view of the backups configured across different workloads.

Backup Vault

A Backup vault is a storage entity in Azure that holds backup data for various newer workloads that Azure Backup supports, such as Azure Database for PostgreSQL servers and Azure Disks. Backup vaults make it easy to organize your backup data, while minimizing management overhead. Backup vaults are based on the Azure Resource Manager model of Azure, which provides enhanced capabilities to help secure backup data.

To configure backup,

  1. Go to the Backup vault
  2. Assign a backup policy
  3. Select the managed disk that needs to be backed up and provide a resource group where the snapshots are to be stored and managed.
  4. Azure Backup automatically triggers scheduled backup jobs that create an incremental snapshot of the disk according to the backup frequency.
  5. Older snapshots are deleted according to the retention duration specified by the backup policy.

Once you configure the backup of a managed disk, a backup instance will be created within the backup vault. Using the backup instance, you can find health of backup operations, trigger on-demand backups, and perform restore operations. You can also view health of backups across multiple vaults and backup instances using Backup Center, which provides a single pane of glass view.

May be you can heard or meet the name Backup Center, what it is?

  • Basically, it just a single place for unified management. To govern, monitor, operate, and analyze backups at scale.. Which mean you can create Backup vault in Backup Center (as the image below).
    image alt
    backup center: create vault

You can create a vault in Backup Vault or Backup Center. Check both reference here
Backup Vault
Backup Center

Conclusion

Backup is a high requirement that needs to implement carefully. Depend on your scenario, your requirement that the strategy is different.
For me, I would recommend using the existing backup service on the cloud for quick, easy implementation, have centralized management. I think we can do some research, read some practical then we can apply it, somehow it can help you recognize the difference between that provider’s service

Share on

Nhat Le
WRITTEN BY
Nhat Le
DevOps Engineer (Junior)