Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Wiki Replica
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
TPA
Wiki Replica
Commits
e60f0e10
Verified
Commit
e60f0e10
authored
3 months ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
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
3 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
howto/postgresql.md
+34
-11
34 additions, 11 deletions
howto/postgresql.md
with
34 additions
and
11 deletions
howto/postgresql.md
+
34
−
11
View file @
e60f0e10
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment