Skip to content

postgresfirst/PGF-tools

Repository files navigation

Postgresfirst Tools

This repository hosts Postgresfirst companion tools designed to simplify enterprise-grade PostgreSQL operations.

  • PGF Copycascade → Active-Passive replication manager (simplified cascading replication built on repmgr / pgcopy)
  • PGF Dataguardian → Backup and recovery automation tool (built on pgBackRest) with support for Point-in-Time Recovery (PITR)

📦 PGF Copycascade (Active-Passive Replication)

Purpose:
Provides an easy-to-deploy framework for setting up and maintaining active-passive cascading replication clusters.

Features

  • Automates replica provisioning using base backups
  • Supports cascading replication chains (Primary → Standby → Downstream Standby)
  • Auto-failover ready (works with Patroni or similar orchestrators)
  • Simplified CLI for node registration and switchover

Quick Start

# Register a primary
pgcopycascade register --primary --node-id=1

# Add a standby
pgcopycascade register --standby --node-id=2 --host=standby1

# Verify cluster topology
pgcopycascade cluster show

🛡️ PGF Dataguardian (Backup & PITR)

Purpose:
Enterprise-grade backup, retention, and recovery system for PostgreSQL, powered by pgBackRest.

Features

  • Full, incremental, and differential backups
  • Secure compressed and encrypted storage
  • PITR: restore PostgreSQL to any timestamp or transaction ID
  • Retention policies & archive management
  • Supports both on-prem and cloud object storage

Backup Example

# Run a full backup
pgf-dataguardian backup full --repo=/data/backups

# Run an incremental backup
pgf-dataguardian backup incr

Recovery & PITR Example

# Restore to a specific timestamp
pgf-dataguardian restore --time "2025-08-25 10:15:00"

# Or to a transaction ID
pgf-dataguardian restore --xid 987654

🔧 Prerequisites

  • PostgreSQL 13–17
  • Linux (RHEL, CentOS, Ubuntu, Debian; x86_64/ARM64)
  • Python 3.8+ (for PGF Copycascade CLI)
  • pgBackRest pre-installed for PGF Dataguardian

📖 Documentation


⚠️ Disclaimer

Postgresfirst tools are provided as community open-source utilities.
Production use should be backed by proper HA orchestration (Patroni, Kubernetes operators, or third-party HA layers) and tested against your environment’s DR policies.

About

PGF tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published