/magda-wal-g

Docker image extends the bitnami WAL-G Image and adds envdir utility

Primary LanguageJavaScriptApache License 2.0Apache-2.0

magda-wal-g

Docker image extends the bitnami WAL-G Image and adds envdir utility.

How to use envdir with WAL-G

$ # To use in k8s, we can map a configmap or secret as volumn to `/etc/wal-e.d/env`
$ mkdir -p /etc/wal-e.d/env
$ echo "secret-key-content" > /etc/wal-e.d/env/AWS_SECRET_ACCESS_KEY
$ echo "access-key" > /etc/wal-e.d/env/AWS_ACCESS_KEY_ID
$ echo 's3://some-bucket/directory/or/whatever' > \
  /etc/wal-e.d/env/WALE_S3_PREFIX
  
$ /etc/paenvdir /etc/wal-e.d/env wal-g backup-push
# add user record in /etc/passwd for user 1001 as wal-g 
# optional; required when call `wal-g backup-push` remotely to connect to postgresql
$ /usr/local/bin/adduser.sh 
$ /usr/bin/envdir /etc/wal-g.d/env /usr/local/bin/wal-g backup-push
$ /usr/bin/envdir /etc/wal-g.d/env /usr/local/bin/wal-g delete --confirm retain FULL 7

Use WAL-G for creating base backup remotely

wal-g supports creating base backup remotely via postgresql base backup protocol.

The protocol requries:

host     replication     all        0.0.0.0/0               md5