Azure
Prerequisites
First of all, you need to have an Azure account, an Azure storage account and a blob container.
A container organizes a set of blobs, similar to a directory in a file system. A storage account can include an unlimited number of containers, and a container can store an unlimited number of blobs.
To create an Azure storage account with the Azure portal:
Sign in to the [Azure portal][azure].
From the left portal menu, select Storage accounts to display a list of your storage accounts. If the portal menu isn't visible, click the menu button to toggle it on.
On the Storage accounts page, select Create.
On the Basics tab, provide a resource group name and storage account name. You can go for the default settings of the other fields.
Choose Next: Advanced.
On the Advanced tab, you can configure additional options and modify default settings for your new storage account. You can go for the default settings.
Choose Next: Networking.
On the Networking tab, you can go for the default settings.
Choose Next: Data protection.
On the Data protection tab, you can for the default settings.
Choose Next: Encryption.
On the Encryption tab, you can for the default settings.
Choose Next: Tags.
Choose Next: Review to see all of the choices you made up to this point. When you are ready to proceed, choose Create.
To create a blob container with the Azure portal:
In the navigation pane for the storage account, scroll to the
Data storagesection and select Containers.Within the Containers pane, select the
+ Containerbutton to open the New container pane.Within the New Container pane, provide a Name for your new container.
Select Create to create the container.
To get the Azure storage account shared key which is required for pgmoneta configuration:
In the navigation pane for the storage account, scroll to the
Security + networkingsection and select Access Keys.Under key1, find the Key value. Select the Copy button to copy the account key.
You can use either of the two keys to access Azure Storage, but in general it's a good practice to use the first key, and reserve the use of the second key for when you are rotating keys.
Modify the pgmoneta configuration
You need to have a storage space for 1 backup on your local computer.
Change pgmoneta.conf to add
storage_engine = azure
azure_storage_account = the-storage-account-name
azure_container = the-container-name
azure_shared_key = the-storage-account-shared-key
azure_base_dir = directory-where-backups-will-be-stored-inunder the [pgmoneta] section.