... | ... | @@ -197,13 +197,9 @@ PostgreSQL is special and needs to be upgraded manually. |
|
|
server is `bungei`. See [howto/postgresql](howto/postgresql) for details of that
|
|
|
procedure.
|
|
|
|
|
|
2. Once the backup completes, move the directory out of the way and
|
|
|
recreate it:
|
|
|
|
|
|
ssh bungei.torproject.org "mv /srv/backups/pg/meronense /srv/backups/pg/meronense-11 && sudo -u torbackup mkdir /srv/backups/pg/meronense"
|
|
|
|
|
|
3. on the database server, possibly stop users of the database,
|
|
|
because it will have to be stopped for the major upgrade.
|
|
|
3. Once the backup completes, on the database server, possibly stop
|
|
|
users of the database, because it will have to be stopped for the
|
|
|
major upgrade.
|
|
|
|
|
|
on the Bacula director, in particular, this probably means waiting
|
|
|
for all backups to complete and stopping the director:
|
... | ... | @@ -215,7 +211,17 @@ PostgreSQL is special and needs to be upgraded manually. |
|
|
monitoring system. an alternative is to just stop PostgreSQL
|
|
|
altogether:
|
|
|
|
|
|
service postgresql@11-main
|
|
|
service postgresql@11-main stop
|
|
|
|
|
|
This also involves stopping Puppet so that it doesn't restart
|
|
|
services:
|
|
|
|
|
|
puppet agent --disable "PostgreSQL upgrade"
|
|
|
|
|
|
2. On the storage server, move the directory out of the way and
|
|
|
recreate it:
|
|
|
|
|
|
ssh bungei.torproject.org "mv /srv/backups/pg/meronense /srv/backups/pg/meronense-11 && sudo -u torbackup mkdir /srv/backups/pg/meronense"
|
|
|
|
|
|
3. on the database server, do the actual cluster upgrade:
|
|
|
|
... | ... | @@ -268,21 +274,21 @@ PostgreSQL is special and needs to be upgraded manually. |
|
|
|
|
|
# bacula storage
|
|
|
|
|
|
6. once everything works okay, remove the old packages:
|
|
|
6. make a new full backup of the new cluster:
|
|
|
|
|
|
apt purge postgresql-11 postgresql-client-11
|
|
|
ssh -tt bungei.torproject.org 'sudo -u torbackup postgres-make-one-base-backup $(grep ^meronense.torproject.org $(which postgres-make-base-backups ))'
|
|
|
|
|
|
7. purge the old backups directory after a week:
|
|
|
7. make sure you check for gaps in the write-ahead log, see
|
|
|
[tpo/tpa/team#40776](https://gitlab.torproject.org/tpo/tpa/team/-/issues/40776) for an example of that problem and [the
|
|
|
WAL-MISSING-AFTER PosgreSQL playbook](howto/postgresql#wal-missing-after) for recovery.
|
|
|
|
|
|
ssh bungei.torproject.org "echo 'rm -r /srv/backups/pg/meronense-11/' | at now + 7day"
|
|
|
8. once everything works okay, remove the old packages:
|
|
|
|
|
|
8. make a new full backup of the new cluster:
|
|
|
apt purge postgresql-11 postgresql-client-11
|
|
|
|
|
|
ssh -tt bungei.torproject.org 'sudo -u torbackup postgres-make-one-base-backup $(grep ^meronense.torproject.org $(which postgres-make-base-backups ))'
|
|
|
9. purge the old backups directory after a week:
|
|
|
|
|
|
9. make sure you check for gaps in the write-ahead log, see
|
|
|
[tpo/tpa/team#40776](https://gitlab.torproject.org/tpo/tpa/team/-/issues/40776) for an example. TODO: expand. what's the
|
|
|
actual command?
|
|
|
ssh bungei.torproject.org "echo 'rm -r /srv/backups/pg/meronense-11/' | at now + 7day"
|
|
|
|
|
|
It is also wise to read the [release notes](https://www.postgresql.org/docs/release/) for the relevant
|
|
|
release to see if there are any specific changes that are needed at
|
... | ... | |