Module backup

Module backup 

Source
Expand description

Configuration backup and rollback functionality

This module provides:

  • Configuration file backup before changes
  • Rollback to previous configurations
  • Configuration history tracking
  • Automatic backup on configuration changes

Structs§

ConfigBackup
Backup metadata
ConfigHistoryEntry
Configuration history entry
PgHbaRule
pg_hba.conf rule

Enums§

PgHbaDiff
pg_hba.conf difference

Functions§

backup_config
Create a backup of PostgreSQL configuration files
cleanup_old_backups
Delete old backups, keeping only the most recent N backups
diff_pg_hba_rules
Compare two sets of pg_hba rules and return differences
list_backups
List available configuration backups
parse_pg_hba_rules
Parse pg_hba.conf into structured rules
read_pg_hba
Read current pg_hba.conf content
restore_backup
Restore configuration from a backup
rollback_config
Rollback to the most recent backup