![](/style/images/good.png)
![](/style/images/bad.png)
Quick Guide on Azure Blob Storage Support for Percona Distribution for MongoDB O...
source link: https://www.percona.com/blog/azure-blob-storage-support-for-percona-distribution-for-mongodb-operator/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
If you have ever used backups with Percona Distribution for MongoDB Operator, you should already know that backed-up data is stored outside the Kubernetes cluster – on Amazon S3 or any S3-compatible storage. Storage types not compatible with the S3 protocol were supported indirectly in the case of an existing S3 wrapper/gateway. A good example of such a solution is running MinIO Gateway on Azure Kubernetes Service to store backups on Azure Blob Storage.
Starting with Operator version 1.11, it is now possible to use Azure Blob Storage for backups directly:
The following steps will allow you to configure it.
1. Get Azure Blob Storage Credentials
As with most other S3-compatible storage types, the first thing to do is to obtain credentials the Operator will use to access Azure Blob storage.
If you are new to Azure, these two tutorials will help you to configure your storage:
When you have a container to store your backups, getting credentials to access it involve the following steps:
- Go to your storage account settings,
- Open the “Access keys” section,
- Copy and save both the account name and account key as shown on a screenshot below:
2. Create a Secret with Credentials
The Operator will use a Kubernetes Secrets Object to obtain the needed credentials. Create this Secret with credentials using the following command:
3. Setup spec.backup Section in your deploy/cr.yaml file
As usual, backups are configured via the same-name section in the deploy/cr.yaml configuration file.
Make sure that backups are enabled (backup.enable key set to true), and add the following lines to the backup.storages subsection (use the proper name of your container):
If you want to schedule a regular backup, add the following lines to the backup.tasks subsection:
The backup schedule is specified in crontab format (the above example runs backups at 00:00 on Sunday). If you know nothing about cron schedule expressions, you can use this online generator.
The full backup section in our example will look like this:
You can find more information on backup options in the official backups documentation and the backups section of the Custom Resource options reference.
Percona Distribution for MongoDB is a freely available MongoDB database alternative, giving you a single solution that combines the best and most important enterprise components from the open source community, designed and tested to work together.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK