# Display lines 1-120 of the .walg_env file in the Postgres container (shows WALG environment variables/config)
docker exec postgres bash -c "sed -n '1,120p' /var/lib/postgresql/.walg_env"
# Test SSH connectivity from within the Postgres container as the postgres user to the backup server (WALG SSH) with a short timeout
docker exec postgres bash -c "su - postgres -c 'ssh -o BatchMode=yes -o ConnectTimeout=5 -p ${SSH_PORT:-2222} ${SSH_USERNAME:-walg}@${SSH_HOST:-ssh-server} echo ok'"
# List backups using WAL-G inside the Postgres container as the postgres user, sourcing environment variables first
docker exec postgres bash -c "su - postgres -c 'source /var/lib/postgresql/.walg_env; wal-g backup-list'"
Monitor and debug