February 2020
Intermediate to advanced
734 pages
38h 13m
English
Of course, we might not need to retain transaction logs forever. WAL-E also provides a simple command for purging old WAL files that have served their purpose. We're mainly concerned with high availability, so being able to restore from a backup taken several weeks ago probably isn't necessary. We can use a command like this to remove these old files:
envdir ~postgres/env wal-e delete --confirm retain 2
This would remove all but WAL files for the two most recent backup operations. The --confirm flag commits the change; otherwise, WAL-E errs on the side of caution and considers the command a dry run.
Unfortunately, this only really works if we have performed a backup with WAL-E. If our database is too large for this to ...
Read now
Unlock full access