... | ... | @@ -946,6 +946,10 @@ information on how to pick a restore procedure. |
|
|
Make sure you run the SAME MAJOR VERSION of PostgreSQL than the
|
|
|
backup! You cannot restore across versions. This might mean
|
|
|
installing from backports or an older version of Debian.
|
|
|
|
|
|
This procedure also assumes the server is configured with the
|
|
|
`profile::postgres` class in Puppet, since it uses a script from
|
|
|
there to copy the WAL files from backup.
|
|
|
|
|
|
3. On that new PostgreSQL server, show the `postgres` server public
|
|
|
key, creating it if missing:
|
... | ... | @@ -1058,7 +1062,8 @@ information on how to pick a restore procedure. |
|
|
service postgresql start
|
|
|
tail -f /var/log/postgresql/*
|
|
|
|
|
|
You should see something like this:
|
|
|
You should see something like this this in
|
|
|
`/var/log/postgresql/postgresql-13-main.log`:
|
|
|
|
|
|
2019-10-09 21:17:47.335 UTC [9632] LOG: database system was interrupted; last known up at 2019-10-04 08:12:28 UTC
|
|
|
2019-10-09 21:17:47.517 UTC [9632] LOG: starting archive recovery
|
... | ... | @@ -1079,9 +1084,12 @@ information on how to pick a restore procedure. |
|
|
2019-10-09 21:20:41.738 UTC [9632] LOG: restored log file "00000001000005B2000000A2" from archive
|
|
|
2019-10-09 21:20:43.773 UTC [9632] LOG: restored log file "00000001000005B2000000A3" from archive
|
|
|
|
|
|
... and so on.
|
|
|
... and so on. Note that you do see some of those notices in the
|
|
|
normal syslog/journald logs, but, critically, *not* the following
|
|
|
recovery one.
|
|
|
|
|
|
Then the recovery will complete with something like this:
|
|
|
Then the recovery will complete with something like this, again in
|
|
|
`/var/log/postgresql/postgresql-13-main.log`:
|
|
|
|
|
|
2019-10-10 01:30:55.460 UTC [16953] LOG: redo done at 5B8/9C5BE738
|
|
|
2019-10-10 01:30:55.460 UTC [16953] LOG: last completed transaction was at log time 2019-10-10 01:04:23.238233+00
|
... | ... | @@ -1092,8 +1100,10 @@ information on how to pick a restore procedure. |
|
|
2019-10-10 01:32:12.438 UTC [16950] LOG: database system is ready to accept connections
|
|
|
2019-10-10 01:32:12.439 UTC [26501] LOG: autovacuum launcher started
|
|
|
|
|
|
9. Then remove the temporary SSH access on the backup server, either
|
|
|
by removing the `.more` key file or restoring the previous key
|
|
|
The server is now ready for use.
|
|
|
|
|
|
9. Remove the temporary SSH access on the backup server, either by
|
|
|
removing the `.more` key file or restoring the previous key
|
|
|
configuration:
|
|
|
|
|
|
rm /etc/ssh/userkeys/torbackup.more
|
... | ... | |