Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This is an amazing documentation! Us oldie but goldie spidermen have documented
./framework_docs/framework
./examples/examples
./spider_conference/spider_conference
./mattermost/mattermost
spiderman_duties
rostsystem
template
15 changes: 15 additions & 0 deletions source/mattermost/backup/backup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Mattermost Backup
======================

To properly backup Mattermost, both the database and all the files/content need to be backed up.
Backing up the files is pretty easy, copying is good enough.

To back up the database we need to first dump it to a file. On the server there
is a systemd service ``mattermost_backup.service`` which handles this.
See: :ref:`mm_db_backup`.

.. toctree::
:maxdepth: 2
:caption: Contents:

backup_db
20 changes: 20 additions & 0 deletions source/mattermost/backup/backup_db.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _mm_db_backup:
Mattermost DB Backup
==========


There is a service and corresponding timer,
``mattermost_backup.service`` and ``mattermost_backup.timer``
that regularly (once a week on saturdays as of 2025-05-09) uses ``pg_dump``
inside the postgres service of the mattermost docker compose to dump the
database to a gzipped file in ``/fsek/mattermost_postgres_backup``.

This
service assumes that:

1. The directory ``/fsek/mattermost_postgres_backup`` exists
2. The mattermost ``docker-compose.yml`` is in the directory ``/fsek/mattermost_postgres_backup``
3. The database is called ``mattermost`` and the user is named ``mmuser``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, maybe not


Note that if any of these change you **must** update
``mattermost_backup.service`` or else it will stop working!
9 changes: 9 additions & 0 deletions source/mattermost/mattermost.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _mattermost-guide:
Mattermost
=========

.. toctree::
:maxdepth: 1
:caption: Contents:

./backup/backup