Skip to content

Useful commands #33

Description

@mfa777

Monitor and debug

# 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'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions