Skip to content
Snippets Groups Projects
Verified Commit e60f0e10 authored by anarcat's avatar anarcat
Browse files

remove old backups only after testing new ones, improve bootstrap

parent b5adaa8e
No related branches found
No related tags found
No related merge requests found
Pipeline #231250 passed with warnings
......@@ -2146,16 +2146,48 @@ This will eventually become the default, but for now that needs to be
added by hand, either in `hiera/roles/$ROLE.yaml` or
`hiera/nodes/$FQDN.yaml` if the node does not have a role.
The configuration of the new backup can be tested with this command on
the client:
sudo -u postgres pgbackrest --stanza=`hostname -f` check
For example, this was done to test `weather-01`:
root@weather-01:~# sudo -u postgres pgbackrest --stanza=weather-01.torproject.org check
Then Puppet needs to run on the "client" (the PostgreSQL server) and
on the "repository" (the backup server, currently
`backup-storage-01`). The full backups will run in the coming week,
but can be ran manually with:
but can be ran manually on the repository server with:
systemctl start pgbackrest-backup-full@$HOSTNAME.service
For example:
systemctl start pgbackrest-backup-full@materculae.service
root@backup-storage-01:~# systemctl start pgbackrest-backup-full@materculae.service
You should be able to see information about that backup with the
`info` command on the client:
sudo -u postgres pgbackrest --stanza=`hostname -f` info
For example:
```
root@weather-01:~# sudo -u postgres pgbackrest --stanza=`hostname -f` info
stanza: weather-01.torproject.org
status: ok
cipher: none
db (current)
wal archive min/max (15): 000000010000001F00000004/00000001000000210000002F
full backup: 20241118-202245F
timestamp start/stop: 2024-11-18 20:22:45 / 2024-11-18 20:28:43
wal start/stop: 000000010000001F00000009 / 000000010000001F00000009
database size: 40.3MB, database backup size: 40.3MB
repo1: backup set size: 7.6MB, backup size: 7.6MB
```
Finally, the old backup directory needs to be moved out to avoid
warnings on the old storage server (currently `bungei`):
......@@ -2170,15 +2202,6 @@ The old backups should be scheduled for removal with:
echo rm -r /srv/backups/pg/$HOSTNAME.old | at now + 30 days
The configuration of the new backup can be tested with this command on
the client:
sudo -u postgres pgbackrest --stanza=$FQDN check
For example, this was done to test `weather-01`:
root@weather-01:~# sudo -u postgres pgbackrest --stanza=weather-01.torproject.org check
### Manual configuration
Those instructions are kept for historical reference, and are all
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment