parent
f49e4894cc
commit
3ff54bc90f
@ -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.
|
||||
|
||||
|
@ -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"]
|
||||
|
Reference in New Issue
Block a user