diff --git a/README.md b/README.md index 5f87674..1de47ae 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,9 @@ If deploying to AWS, you could also set following variables to enable [Wal-E](ht All four environment variables are required. It will enable completed WAL segments sent to archive storage (S3). The base backup and clean up can be done through the following command: ```bash # Base backup -docker exec mattermost-db su - postgres sh -c "/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-push /var/lib/postgresql/data" +docker exec mattermost-db su - postgres sh -c "/usr/bin/envdir /etc/wal-e.d/env /usr/bin/wal-e backup-push /var/lib/postgresql/data" # Keep the most recent 7 base backups and remove the old ones -docker exec mattermost-db su - postgres sh -c "/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e delete --confirm retain 7" +docker exec mattermost-db su - postgres sh -c "/usr/bin/envdir /etc/wal-e.d/env /usr/bin/wal-e delete --confirm retain 7" ``` Those tasks can be executed through a cron job or systemd timer. diff --git a/db/Dockerfile b/db/Dockerfile index 4b0a03c..dc988d1 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -26,4 +26,4 @@ COPY entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] CMD ["postgres"] -VOLUME ["/var/run/postgresql", "/usr/share/postgresql/", "/var/lib/postgresql/data", "/tmp"] +VOLUME ["/var/run/postgresql", "/usr/share/postgresql/", "/var/lib/postgresql/data", "/tmp", "/etc/wal-e.d/env"]