Loading howto/postgresql.md +15 −4 Original line number Diff line number Diff line Loading @@ -775,10 +775,9 @@ the backups, overwriting the current server. cd /var/lib/postgresql/15/ 1. stop the server, and keep it from starting: 1. stop the server: service postgresql.service stop sudo -u postgres rm main/global/pg_control service postgresql stop 2. move or remove all files from the old cluster, alternatively: Loading @@ -795,9 +794,21 @@ the backups, overwriting the current server. sudo -u postgres pgbackrest --stanza=`hostname -f` restore Backup progress can be found in the log files, in: /var/log/pgbackrest/`hostname -f`-restore.log It takes a couple of minutes to start, but eventually you should see lines like: 2024-12-05 19:22:52.582 P01 DETAIL: restore file /var/lib/postgresql/15/main/base/16402/852859.4 (1GB, 11.39%) checksum 8a17b30a73a1d1ea9c8566bd264eb89d9ed3f35c The percentage there (`11.39%` above) is how far in the restore you are. 4. Start the restored server: sudo service postgresql.service start sudo service postgresql start This procedure also assumes that the `pgbackrest` command is functional. This should normally be the case on an existing server, Loading Loading
howto/postgresql.md +15 −4 Original line number Diff line number Diff line Loading @@ -775,10 +775,9 @@ the backups, overwriting the current server. cd /var/lib/postgresql/15/ 1. stop the server, and keep it from starting: 1. stop the server: service postgresql.service stop sudo -u postgres rm main/global/pg_control service postgresql stop 2. move or remove all files from the old cluster, alternatively: Loading @@ -795,9 +794,21 @@ the backups, overwriting the current server. sudo -u postgres pgbackrest --stanza=`hostname -f` restore Backup progress can be found in the log files, in: /var/log/pgbackrest/`hostname -f`-restore.log It takes a couple of minutes to start, but eventually you should see lines like: 2024-12-05 19:22:52.582 P01 DETAIL: restore file /var/lib/postgresql/15/main/base/16402/852859.4 (1GB, 11.39%) checksum 8a17b30a73a1d1ea9c8566bd264eb89d9ed3f35c The percentage there (`11.39%` above) is how far in the restore you are. 4. Start the restored server: sudo service postgresql.service start sudo service postgresql start This procedure also assumes that the `pgbackrest` command is functional. This should normally be the case on an existing server, Loading