I am trying to figure out how to start docker container with additional options to make incremental backups
I tried somehow to fill some enviroment variables, but it didn’t work (obviously)
container_name: database
image: $HOST/postgres:$POSTGRES_TAG
restart: always
labels:
co.elastic.metrics/raw: "[{\"enabled\":true,\"metricsets\":[\"database\",\"bgwriter\",\"activity\",\"statement\"],\"module\":\"postgresql\",\"hosts\":[\"postgres://localhost:5432?sslmode=disable\"],\"username\":\"postgres\",\"password\":\"$DB_PASS\"}]"
environment:
POSTGRES_DB: portal
POSTGRES_PASSWORD: $DB_PASS
POSTGRES_HOST_AUTH_METHOD: 'local replication all trust'
POSTGRES_WAL_LEVEL: 'replica'
POSTGRES_ARCHIVE_MODE: 'on'
POSTGRES_ARCHIVE_TIMEOUT: 60
POSTGRES_MAX_WAL_SENDERS: 5
ports:
- "5432:5432"
volumes:
- /var/lib/postgresql/data:/var/lib/postgresql/data
How I can setup making incremental backups (wal) inside docker container?