-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup.conf.example
More file actions
136 lines (97 loc) · 4.72 KB
/
backup.conf.example
File metadata and controls
136 lines (97 loc) · 4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# -----------------------------
# pg_backctl Backup Configuration
# -----------------------------
#
# This file contains configuration for pg_backctl database backups.
# Copy this file to 'backup.conf' and customize for your environment.
#
# Usage:
# ./create_backup.sh -c /path/to/backup.conf
# ./create_backup.sh --config backup.conf
#
# Note: Command-line arguments override config file values
#------------------------------------------------------------------------------
# DATABASE CONNECTION
#------------------------------------------------------------------------------
[database]
# - Docker Compose Settings -
service = postgres # Docker Compose service name (REQUIRED)
compose_file = docker-compose.yml # Path to docker-compose file (REQUIRED)
# - Connection Settings -
#port = 5432 # Database port (default: 5432)
#user = postgres # Database user (default: postgres)
#------------------------------------------------------------------------------
# BACKUP DESTINATION
#------------------------------------------------------------------------------
[destination]
# Choose ONE of the following destination types:
# - Local Storage -
#path = /backups/postgres # Local backup directory
# - S3 Storage -
#s3_url = s3://mybucket # S3 bucket URL
#s3_endpoint = https://s3.region.provider.com # S3 endpoint URL
# - S3 Path Prefix -
# Backups are stored at: s3://bucket/prefix/YYYYMMDDTHHMMSS/
# Examples:
# s3_prefix = backups # Recommended for organization
# s3_prefix = postgresql-cluster/base # For backward compatibility with other tools
# s3_prefix = # Empty = store at bucket root level
s3_prefix = backups
#------------------------------------------------------------------------------
# BACKUP OPTIONS
#------------------------------------------------------------------------------
[backup]
# - Backup Label -
#label = manual-backup-20250124 # Custom backup label (default: auto-generated timestamp)
# - Compression -
compression = gzip # Compression method: gzip, bzip2, none
# gzip: fast, standard compression
# bzip2: slower, better compression
# none: no compression (fastest)
# - Disk Space Check -
#min_disk_space_gb = 5 # Minimum free disk space required (GB)
# If not set, automatically calculated from data directory size
#disk_space_margin_gb = 2 # Safety margin added to data directory size (default: 2GB)
# Only used when min_disk_space_gb is not set
# - Retention Policy -
# Automatically cleanup old backups from S3
# Choose ONE of the following strategies:
#retention_days = 30 # Keep backups for N days
#retention_count = 10 # Keep last N backups
# Note: retention_count takes precedence if both set
# Note: No cleanup if neither is set
#------------------------------------------------------------------------------
# AWS CREDENTIALS
#------------------------------------------------------------------------------
[aws]
# AWS credentials for S3 uploads
# Can also be set via environment variables or .env file
#access_key = YOUR_ACCESS_KEY
#secret_key = YOUR_SECRET_KEY
#region = us-east-1
#------------------------------------------------------------------------------
# DOCKER IMAGE
#------------------------------------------------------------------------------
[docker]
# pg_backctl Docker image for S3 operations
image = ghcr.io/avistotelecom/pg_backctl:latest
#------------------------------------------------------------------------------
# ADVANCED OPTIONS
#------------------------------------------------------------------------------
[advanced]
# - Backup Checksums -
#
# pg_backctl automatically generates SHA256 checksums for all backup files:
# • backup.sha256 - SHA256 checksums for all files
# • backup.sha256.info - Metadata describing checksum format
#
# These files enable external verification tools to validate backup integrity.
# No automatic verification is performed by pg_backctl.
#
# Manual verification example:
# aws s3 cp s3://bucket/backups/20251027T143000/ ./backup --recursive
# cd backup && sha256sum -c backup.sha256
#
# Future features (not yet implemented):
# encryption =
# incremental = false