From 736a132b3be593edef254de76d3577756a7655f3 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 10 Aug 2025 10:30:36 +0200 Subject: [PATCH] chore(postgresql): suggest pgbackrest and percona toolkit for management --- knowledge base/percona toolkit.md | 68 +++++++++++++++++++++++++++++++ knowledge base/postgresql.md | 14 ++++++- knowledge base/template.md | 6 +-- 3 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 knowledge base/percona toolkit.md diff --git a/knowledge base/percona toolkit.md b/knowledge base/percona toolkit.md new file mode 100644 index 0000000..c6449dd --- /dev/null +++ b/knowledge base/percona toolkit.md @@ -0,0 +1,68 @@ +# Percona toolkit + +> TODO + +Intro + + + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) + 1. [Sources](#sources) + +## TL;DR + + + + + + + +## Further readings + +- [Website] +- [Codebase] + +### Sources + +- [Documentation] + + + + + + + +[Codebase]: https://github.com/percona/percona-toolkit +[Documentation]: https://docs.percona.com/percona-toolkit/ +[Website]: https://www.percona.com/percona-toolkit + + diff --git a/knowledge base/postgresql.md b/knowledge base/postgresql.md index f3a7347..68da290 100644 --- a/knowledge base/postgresql.md +++ b/knowledge base/postgresql.md @@ -35,6 +35,11 @@ DB-specific roles). Extensions in PostgreSQL are managed **per database**. +Prefer using [pg_dumpall] to create **logical** backups.
+Consider using [pgBackRest] to create **physical** backups. + +Consider using the [Percona toolkit] to ease management. +
Setup @@ -173,7 +178,8 @@ SELECT * FROM entries_in_column('vendors','vendor_id'); ## Backup -Refer [pg_dump] and [pg_dumpall]. +Refer [pg_dump] and [pg_dumpall] for **logical** backups.
+Should one have **physical** access to the DB data directory (`$PGDATA`), consider using [pgBackRest] instead. PostgreSQL offers the `pg_dump` and `pg_dumpall` native client utilities to dump databases to files.
They produce sets of SQL statements that can be executed to reproduce the original databases' object definitions and @@ -239,7 +245,9 @@ pg_dumpall … -g --no-role-passwords ## Restore -Refer [psql] and [pg_restore]. +Refer [psql] and [pg_restore] to restore **logical** dumps created via [pg_dump] and [pg_dumpall].
+Should one have **physical** access to the DB data directory (`$PGDATA`), consider using [pgBackRest] for both processes +instead. PostgreSQL offers the `pg_restore` native client utility for restoration of databases from dumps. @@ -372,8 +380,10 @@ See also [yugabyte/yugabyte-db]. [mysql]: mysql.md +[Percona toolkit]: percona%20toolkit.md [pg_flo]: pg_flo.md [pgadmin]: pgadmin.md +[pgBackRest]: pgbackrest.md [sql]: sql.md diff --git a/knowledge base/template.md b/knowledge base/template.md index 155b459..3bf0693 100644 --- a/knowledge base/template.md +++ b/knowledge base/template.md @@ -61,8 +61,8 @@ Intro -[codebase]: https://github.com/project/ -[documentation]: https://website/docs/ -[website]: https://website/ +[Codebase]: https://github.com/project/ +[Documentation]: https://website/docs/ +[Website]: https://website/