Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Vincent Sellier
swh-docs
Commits
ee054f4c
Verified
Commit
ee054f4c
authored
3 years ago
by
Vincent Sellier
Browse files
Options
Downloads
Patches
Plain Diff
sysadm: add a postgresql backup management section
parent
1ac3eddb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sysadm/data-silos/postgresql/backup.rst
+70
-0
70 additions, 0 deletions
sysadm/data-silos/postgresql/backup.rst
sysadm/data-silos/postgresql/index.rst
+1
-0
1 addition, 0 deletions
sysadm/data-silos/postgresql/index.rst
with
71 additions
and
0 deletions
sysadm/data-silos/postgresql/backup.rst
0 → 100644
+
70
−
0
View file @
ee054f4c
.. _postgresql_backups:
How to manage the PostgreSQL backups
====================================
.. admonition:: Intended audience
:class: important
sysadm staff members
The archive's postgresql is backed up every week by barman.
The service is running on ``banco``
List the servers with backups
-----------------------------
.. code:: bash
root@banco:~# sudo -u barman barman list-server
swh-10 - Software Heritage Database (inactive)
swh-11 - Software Heritage Database (inactive)
swh-12 - Software Heritage Database
List the backups of a server
----------------------------
.. code:: bash
root@banco:~# sudo -u barman barman list-backup swh-12
swh-12 20220207T153405 - STARTED
swh-12 20220129T003102 - Mon Jan 31 11:09:42 2022 - Size: 17.3 TiB - WAL Size: 425.5 GiB
swh-12 20220122T003103 - Mon Jan 24 19:41:52 2022 - Size: 17.0 TiB - WAL Size: 608.4 GiB
Manually delete a backup
------------------------
.. code:: bash
root@banco:~# sudo -u barman barman delete swh-12 20220115T003103
Deleting backup 20220115T003103 for server swh-12
Delete associated WAL segments:
00000001000266820000004E
00000001000266820000004F
000000010002668200000050
...
Deleted backup 20220115T003103 (start time: Mon Feb 7 15:24:00 2022, elapsed time: 6 minutes, 56 seconds)
Manually start a backup
-----------------------
A backup can take several days to complete, so don't forget to launch it in a tmux or equivalent.
.. code:: bash
root@banco:~# sudo -u barman barman backup swh-12
Starting backup using rsync-concurrent method for server swh-12 in /srv/barman/swh-12/base/20220207T153405
Backup start at LSN: 26F60/E5916DD0 (0000000100026F60000000E5, 00916DD0)
Starting backup copy via rsync/SSH for 20220207T153405
...
Check the progress:
.. code:: bash
root@banco:~# sudo -u barman barman list-backup swh-12
swh-12 20220207T153405 - STARTED
swh-12 20220129T003102 - Mon Jan 31 11:09:42 2022 - Size: 17.3 TiB - WAL Size: 426.1 GiB
swh-12 20220122T003103 - Mon Jan 24 19:41:52 2022 - Size: 17.0 TiB - WAL Size: 608.4 GiB
This diff is collapsed.
Click to expand it.
sysadm/data-silos/postgresql/index.rst
+
1
−
0
View file @
ee054f4c
...
...
@@ -5,3 +5,4 @@ PostgreSQL
.. toctree::
howto-connect
backup
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