mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(postgresql): suggest pgbackrest and percona toolkit for management
This commit is contained in:
68
knowledge base/percona toolkit.md
Normal file
68
knowledge base/percona toolkit.md
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# Percona toolkit
|
||||||
|
|
||||||
|
> TODO
|
||||||
|
|
||||||
|
Intro
|
||||||
|
|
||||||
|
<!-- Remove this line to uncomment if used
|
||||||
|
## Table of contents <!-- omit in toc -->
|
||||||
|
|
||||||
|
1. [TL;DR](#tldr)
|
||||||
|
1. [Further readings](#further-readings)
|
||||||
|
1. [Sources](#sources)
|
||||||
|
|
||||||
|
## TL;DR
|
||||||
|
|
||||||
|
<!-- Uncomment if used
|
||||||
|
<details>
|
||||||
|
<summary>Setup</summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment if used
|
||||||
|
<details>
|
||||||
|
<summary>Usage</summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment if used
|
||||||
|
<details>
|
||||||
|
<summary>Real world use cases</summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Further readings
|
||||||
|
|
||||||
|
- [Website]
|
||||||
|
- [Codebase]
|
||||||
|
|
||||||
|
### Sources
|
||||||
|
|
||||||
|
- [Documentation]
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Reference
|
||||||
|
═╬═Time══
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- In-article sections -->
|
||||||
|
<!-- Knowledge base -->
|
||||||
|
<!-- Files -->
|
||||||
|
<!-- Upstream -->
|
||||||
|
[Codebase]: https://github.com/percona/percona-toolkit
|
||||||
|
[Documentation]: https://docs.percona.com/percona-toolkit/
|
||||||
|
[Website]: https://www.percona.com/percona-toolkit
|
||||||
|
|
||||||
|
<!-- Others -->
|
||||||
@@ -35,6 +35,11 @@ DB-specific roles).
|
|||||||
|
|
||||||
Extensions in PostgreSQL are managed **per database**.
|
Extensions in PostgreSQL are managed **per database**.
|
||||||
|
|
||||||
|
Prefer using [pg_dumpall] to create **logical** backups.<br/>
|
||||||
|
Consider using [pgBackRest] to create **physical** backups.
|
||||||
|
|
||||||
|
Consider using the [Percona toolkit] to ease management.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Setup</summary>
|
<summary>Setup</summary>
|
||||||
|
|
||||||
@@ -173,7 +178,8 @@ SELECT * FROM entries_in_column('vendors','vendor_id');
|
|||||||
|
|
||||||
## Backup
|
## Backup
|
||||||
|
|
||||||
Refer [pg_dump] and [pg_dumpall].
|
Refer [pg_dump] and [pg_dumpall] for **logical** backups.<br/>
|
||||||
|
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.<br/>
|
PostgreSQL offers the `pg_dump` and `pg_dumpall` native client utilities to dump databases to files.<br/>
|
||||||
They produce sets of SQL statements that can be executed to reproduce the original databases' object definitions and
|
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
|
## Restore
|
||||||
|
|
||||||
Refer [psql] and [pg_restore].
|
Refer [psql] and [pg_restore] to restore **logical** dumps created via [pg_dump] and [pg_dumpall].<br/>
|
||||||
|
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.
|
PostgreSQL offers the `pg_restore` native client utility for restoration of databases from dumps.
|
||||||
|
|
||||||
@@ -372,8 +380,10 @@ See also [yugabyte/yugabyte-db].
|
|||||||
|
|
||||||
<!-- Knowledge base -->
|
<!-- Knowledge base -->
|
||||||
[mysql]: mysql.md
|
[mysql]: mysql.md
|
||||||
|
[Percona toolkit]: percona%20toolkit.md
|
||||||
[pg_flo]: pg_flo.md
|
[pg_flo]: pg_flo.md
|
||||||
[pgadmin]: pgadmin.md
|
[pgadmin]: pgadmin.md
|
||||||
|
[pgBackRest]: pgbackrest.md
|
||||||
[sql]: sql.md
|
[sql]: sql.md
|
||||||
|
|
||||||
<!-- Upstream -->
|
<!-- Upstream -->
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ Intro
|
|||||||
<!-- Knowledge base -->
|
<!-- Knowledge base -->
|
||||||
<!-- Files -->
|
<!-- Files -->
|
||||||
<!-- Upstream -->
|
<!-- Upstream -->
|
||||||
[codebase]: https://github.com/project/
|
[Codebase]: https://github.com/project/
|
||||||
[documentation]: https://website/docs/
|
[Documentation]: https://website/docs/
|
||||||
[website]: https://website/
|
[Website]: https://website/
|
||||||
|
|
||||||
<!-- Others -->
|
<!-- Others -->
|
||||||
|
|||||||
Reference in New Issue
Block a user