Skip to navigation
Backup and restore a PostgreSQL cluster
07.02.24
# List all my postgres clusters: ``` pg_lsclusters ``` # backup source cluster ``` pg_basebackup -D /tmp/backups2 -p5434 ``` # stop up target cluster ``` pg_ctlcluster 15 slbj2 stop ``` # Restore ``` rm /var/lib/postgresql/15/slbj2/* -Rf cp -r /tmp/backups2/* /var/lib/postgresql/15/slbj2/ ``` # start up target cluster ``` pg_ctlcluster 15 slbj2 stop ```
https://backup.ninja/news/postgresql-backups-what-is-pgbasebackup
Reply
Anonymous
Information Epoch 1714269783
Using text data files.
Home
Notebook
Contact us