Skip to content

Commit 2075556

Browse files
committed
Remove all backup script files and prepare for new modular structure
1 parent daeabb6 commit 2075556

20 files changed

Lines changed: 2001 additions & 1334 deletions

config/defaults.conf

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# PostgreSQL NRT Backup Configuration
2+
# This file contains default configuration values that can be overridden by environment variables
3+
4+
# =============================================================================
5+
# Backup Configuration
6+
# =============================================================================
7+
8+
# Backup retention period in days
9+
BACKUP_RETENTION_DAYS=3
10+
11+
# Backup schedules (cron format)
12+
BASE_BACKUP_SCHEDULE="0 3 * * *"
13+
INCREMENTAL_BACKUP_SCHEDULE="0 */6 * * *"
14+
15+
# Remote storage configuration
16+
RCLONE_REMOTE_PATH="postgres-backups"
17+
18+
# pgBackRest configuration
19+
PGBACKREST_STANZA="main"
20+
21+
# =============================================================================
22+
# WAL Monitoring Configuration
23+
# =============================================================================
24+
25+
# Enable WAL growth monitoring
26+
ENABLE_WAL_MONITOR=true
27+
28+
# WAL growth threshold to trigger automatic backup
29+
WAL_GROWTH_THRESHOLD="100MB"
30+
31+
# WAL monitor check interval in seconds
32+
WAL_MONITOR_INTERVAL=60
33+
34+
# Minimum WAL growth required for scheduled backup execution
35+
MIN_WAL_GROWTH_FOR_BACKUP="1MB"
36+
37+
# =============================================================================
38+
# Recovery Configuration
39+
# =============================================================================
40+
41+
# Recovery mode (true/false)
42+
RECOVERY_MODE=false
43+
44+
# Recovery target settings
45+
RECOVERY_TARGET_INCLUSIVE=true
46+
RECOVERY_TARGET_ACTION="promote"
47+
48+
# =============================================================================
49+
# PostgreSQL Configuration
50+
# =============================================================================
51+
52+
# PostgreSQL data directory
53+
PGDATA="/var/lib/postgresql/data"
54+
55+
# PostgreSQL socket directory
56+
PGHOST="/var/run/postgresql"
57+
58+
# PostgreSQL port
59+
PGPORT=5432
60+
61+
# =============================================================================
62+
# Advanced Configuration
63+
# =============================================================================
64+
65+
# Skip rclone configuration verification (for testing only)
66+
RCLONE_SKIP_VERIFY=false
67+
68+
# Additional pgBackRest options
69+
PGBACKREST_CONFIG=/etc/pgbackrest/pgbackrest.conf

config/pgbackrest.conf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[global]
2+
repo1-type=posix
3+
repo1-path=/var/lib/pgbackrest
4+
repo1-retention-full=3
5+
repo1-retention-archive=3
6+
7+
log-level-console=info
8+
log-level-file=debug
9+
log-path=/var/log/pgbackrest
10+
11+
process-max=2
12+
compress-type=lz4
13+
compress-level=3
14+
15+
# Archive settings
16+
archive-async=n
17+
archive-push-queue-max=1GB
18+
19+
# Backup settings
20+
backup-standby=n
21+
delta=y
22+
checksum-page=y
23+
24+
# Stanza configuration will be added dynamically at runtime

0 commit comments

Comments
 (0)