Backups
The Hybrid Manager (HM) features backup and recovery capabilities for its components using various technologies. It offers two backup strategies:
- Postgres backups, which back up your data
- HM backups, which back up the HM system's core functionality
Postgres backups (data plane)
Postgres backups focus on protecting your user data stored in the Postgres database. The following options are available:
Base backups, which are available in all HM deployments.
Snapshot backups, which are available in cloud service provider (CSP) environments and on-premise deployments where appropriate storage and drivers are configured.
Postgres backups leverage robust database features, including write-ahead log (WAL) archiving, to provide granular point-in-time recovery (PITR). This approach allows for a fine-grained recovery point objective (RPO).
HM backups (control plane)
HM backups protect the HM system, including its metadata and system databases. They operate on a separate schedule and produce different backup files from Postgres backups. HM backups are file-system based, with hourly backups of metadata and backups of the system's Postgres databases by default.
Unlike Postgres backups, HM backups don't offer continuous backup through WAL archiving. Recovery is therefore limited to the hourly or user-defined backup intervals.
Key differences and recovery implications
Because of these differences, the RPO and recovery time objective (RTO) vary between your user data (Postgres) and the HM system.
- Postgres (data) offers strong RPO capabilities due to PITR and WAL archiving, potentially allowing for recovery to a very recent point in time.
- For HM (system), RPO is limited to the user-modifiable backup schedule, which is hourly by default.
Component | RPO | RTO | Method | Location |
---|---|---|---|---|
HM | 1 hour (default) | 30 mins or less | Velero | Object storage |
Postgres data plane | 5 minutes or less | Based on data size, backup method, and hardware. | Snapshot or base backup | Object storage |
Data size
For Postgres clusters using base backup, a data size of less than 500 GB is expected to be the effective size limit. (Though it might be up 1 TB, depending on hardware performance.) A Postgres cluster with more than 1 TB of data may encounter backup durations and performance loads that negatively affect quality of service.
For Postgres clusters using snapshot backups, data sizes larger than 1 TB are expected to be supported without the backup and restore processes negatively affecting service quality.
Backup transportability and disaster recovery (DR)
In the simplest configurations, for example using TopoLVM (not available at GA in version 1.1), snapshot backup and recovery is expected to be local only, meaning that snapshot backups can't be moved to another appliance, data center, or location. This limitation effectively rules out DR with the most basic implementation of snapshots.
When HM is configured with enterprise storage and CSI drivers that support snapshots, HM can take advantage of that functionality to provide cross-location DR.
Snapshot availability
Volume snapshots are supported across all environments that provide Kubernetes-compatible volume snapshot functionality.
Snapshot transportability
Transportability of snapshots depends on the specific CSI driver implementation.
AWS specifics
- By default, AWS volume snapshots aren't transportable.
- While restoration to a new host in the same AWS region is possible, cross-region restoration requires additional manual steps.
TopoLVM specifics
TopoLVM snapshots aren't transportable and can't be restored to a different host.
Configuration
You can configure storage, object storage, and backups for:
- Single-node cluster
- Primary/standby cluster
- EDB Postgres Distributed (PGD) cluster
Single-node cluster
Backups of a single-node cluster can have the following characteristics:
- A single-node cluster is deployed using HM.
- You can modify the retention period and backup time or use the default values.
- Automated backups occur after cluster deployment and then daily.
- You can run manual backups.
Back up primary/standby cluster
Backups of a primary/standby cluster can have the following characteristics:
- A primary/standby cluster is deployed using HM.
- You can modify the retention period and backup time or use the default values.
- Automated backups occur after cluster deployment and then daily.
- You can run manual backups.
- Backups are taken from a replica (primary/secondary).
Backup PGD cluster
Backups of a PGD cluster can have the following characteristics:
- A PGD cluster is deployed using HM.
- You can modify the retention period and backup time or use the default values.
- Automated backups occur after cluster deployment and then daily.
- You can run manual backups.
- Backups are taken from a replica (primary/secondary).
HM backups
HM backups include metadata needed to restore the HM system. They don't include backups of user databases. HM backups use Velero to back up to object storage. The default backup schedule is hourly. You can adjust the schedule.
When using the default schedule, the RPO is one hour. This means you can expect to lose up to one hour of HM data in the event of a crash. This doesn't mean data loss at the user database level since user databases are protected with continuous backups of Postgres.
Taking a Postgres backup
You can use the HM console, API, or CLI to take a Postgres backup. To take a Postgres backup with the API or CLI, refer to the API documentation link in the HM console.
To take a Postgres backup using the HM console:
Select the Backups tab to view existing backups:
Select Create Backup.
Enter the location, backup name, and backup method, and then select OK.
Taking an HM backup
Refer to HA/DR to learn how to configure backups of the HM system.
Terminology
The following terminology is used for backup and recovery with Postgres and HM.
Backup
A copy of one or more files from the original location to a secondary location, like object storage. Backups vary by component type (for example, control plane versus data plane) and deployment type (for example, CSP, engineered system, or RHOS).
Backup retention period
The length of time that backup copies of data are stored before being deleted or overwritten. It defines how long you keep your backups available for recovery purposes.
Barman
An open-source Postgres backup tool that's primarily maintained and supported by EDB. When used alone, the term Barman refers to the Barman server or core backup tool, as opposed to the Barman cloud utility scripts. Barman automates many of the Postgres backup and recovery primitives that are required for enterprise-class backup and recovery. Barman provides many innovative features like incremental backups (versus block-level incremental backups that were offered by Postgres), WAL streaming to achieve RPO=0 (or near zero), backup reporting, automated backup file retention management, and other useful capabilities.
Barman cloud utility scripts
A collection of scripts that can be used separately from the Barman server. Their purpose is to copy Postgres backups to S3-compatible object storage. Barman for the cloud is used by the CNP operator and EDB Cloud Service to copy Postgres backups to object storage.
Base backup
The Postgres backup utility pg_basebackup that automates the backup, or file copy, of the required files needed to restore a Postgres instance.
Cloud
A public cloud provider, that is, AWS, Microsoft Azure, and Google Compute Platform (GCP).
Cluster
A collection of databases in a single Postgres instance (also known as the Postgres cluster). In HM, it also refers to a deployment type (for example, single-node, PSR, PGD cluster).
Cloud-native Postgres (CNP)
The open-source Postgres operator developed and maintained by EDB. It provides the foundation for Postgres on Kubernetes in HM.
Postgres cluster
A Postgres instance manages a Postgres cluster. A database cluster is a collection of databases that are stored in a common file system location (the data directory).
pg_dump
A data export and import utility (also referred to as dump). Although it offers many capabilities to export databases in part or in whole, it isn't an enterprise-class, scalable backup tool. However, pg_dump is widely used to export data for a variety of purposes, including creating test databases, data archiving, and migrating from one database to another (or one DBaaS provider to another). HM users use pg_dump to access their Postgres data. The pg_dump utility is installed with the Postgres client and can be used from a user’s client machine.
Recovery
The process of making the restore data consistent and up to date by applying backup data files and changes recorded in the WAL files.
Recovery point objective (RPO)
The point or time (for example, 5 minutes) in a database timeline that can be used for recovery. It is commonly described as answering the question, “How much data can I afford to lose?” RPO is the maximum tolerable amount of data loss, measured in time, that an organization can withstand after a disruption. It defines the point in time to which systems and data must be recovered.
Recovery time objective (RTO)
The maximum tolerable amount of downtime that an organization can withstand after a disruption. It defines the target time within which systems and data must be restored. For example, a production database may have an RTO of 30 minutes, which means that the amount of downtime to perform restore and recovery must not exceed 30 minutes.
Restore
The process of copying files from a backup location to the original or an alternative location to prepare for recovery. An example is copying backup files from object storage to the database server.
Snapshot
A volume-level snapshot or file-system-level backup of data. Snapshot is the fastest and most scalable backup and recovery method available. Snapshot capabilities vary by HM deployment type and the availability of storage features like transportability.
Transportable volume snapshot
A point-in-time copy of data that can be moved or copied to a different storage system, location, or cloud region. This allows for disaster recovery, data migration, and offsite backups.
Non-transportable volume snapshot
A point-in-time copy of data that's confined to the specific storage system or location where it was created. It's primarily used for local data recovery in that system.
Could this page be better? Report a problem or suggest an addition!