-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat: pgbackrest support for backups #7428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
- Configure PostgreSQL with WAL archiving when pgBackRest is enabled (wal_level=replica, archive_mode=on, archive_command) - Add pg1-host, pg1-port, pg1-database, pg1-user to pgbackrest.conf for online backup connectivity - Pass PGPASSWORD and other libpq env vars to pgbackrest container (similar to how pg_dump handles credentials) - Add shared WAL archive volume between PostgreSQL and pgBackRest - Remove --no-online and --force flags from backup/stanza commands - Update documentation to reflect online backup architecture This allows backups to run while PostgreSQL is running without stopping the database, using PostgreSQL's native backup protocol.
|
Drafting this because I want to make database restores work better. Since PgBackRest doesn't always do full backups (that's what makes it better over pg_dump!) it means we need to have different configs for data retention, as it could otherwise break the backup chain and prevent restoring from backups. |
|
Moved away from the sidecar model to just installing it into the container, which makes things a good bit simpler! |
@SkyfallWasTaken is this still a WIP or have you finished everything you wanted to? You can change a PR status from "Open" to "Draft", that would make it clearer to us whether or not you are still working on it / if it's ready for review. |
|
Yeah, still a WIP. Sorry about that! |
Changes
This PR adds PgBackRest support to backups. PgBackRest allows for incremental backups, which means that it is much, much more storage efficient for larger databases.
Things I made sure to add:
If PgBackRest is enabled, instead of requiring an image change, we install PgBackRest into the Postgres container so people can use custom images instead of having to rely on PGBR-specific ones.
Also made sure that functionality works fine in dev mode.
Issues
/claim #7423