Overview of PGHoard features
mainPGHoard is a tool designed for PostgreSQL backup and recovery. Its core capabilities include:
Backup Capabilities
- Automatic periodic basebackups: Scheduled full backups of the database.
- Automatic transaction log (WAL/xlog) backups: Supports multiple methods including
pg_receivewal(formerlypg_receivexlog),archive_command, or experimental PG native replication protocol support viawalreceiver. - Standalone Hot Backup support: Optional support for performing backups without a running standby.
- Cloud object storage support: Compatible with AWS S3, Google Cloud, OpenStack Swift, Azure, and Ceph.
Recovery and Restoration
- Point-in-time-recovery (PITR): Restore the database to a specific moment in time.
- Direct restoration: Restore directly from object storage with built-in compression and encryption.
- Standby initialization: Automatically configure and initialize a new standby from object storage backups as a replicating hot-standby.
Reliability and Monitoring
- Fault-resilience: Retries transfers during temporary object storage connectivity issues and verifies WAL file headers to prevent issues with recycled files.
- Maintenance tools: Includes an "Archive sync" tool to detect and fix holes in WAL backup streams, and an "Archive cleanup" tool to delete obsolete WAL files.
- Monitoring: Automatically manages history cleanup (deleting backups/WAL older than N days), updates statistics in a local file, and creates alert files on disk when problems occur.
Performance
- Parallelism: Uses parallel compression and encryption.
- Optimized Restore: Implements WAL pre-fetching during the restoration process.