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
66 changes: 57 additions & 9 deletions appendix/backup-and-restore/docker-compose.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,28 @@ Backup

By default, a backup is created at at 3 o'clock each night. The backup is
stored in the volume of the **zammad-backup** container under
``/var/tmp/zammad``.
``/var/tmp/zammad``. To trigger a one-time backup manually, use one of the
commands below, depending on your deployment method.

.. tabs::

.. group-tab:: Docker Compose

In your Docker Compose directory, run:

.. code-block:: sh

$ docker compose run --rm --env BACKUP_ONCE=true zammad-backup

.. group-tab:: Portainer

Open the :ref:`console via Portainer's GUI <docker-run-commands>` for the
``zammad-backup`` container with the standard entrypoint ``/bin/bash``
and run:

.. code-block:: sh

$ BACKUP_ONCE=true bin/docker-entrypoint zammad-backup

Restore
-------
Expand All @@ -57,11 +78,38 @@ Restore
You can safely delete it now.
#. Rebuild the Elasticsearch index. You can use Zammad while the rebuild is
running, but search performance is degraded and some data may be temporarily
unavailable in search results. Use the command below for Docker Compose
deployments. When using GUIs like portainer, have a look at the
:ref:`docker-run-commands` section in
the installation documentation.

.. include:: /install/update.rst
:start-after: **Docker Compose:**
:end-before: **Portainer:**
unavailable in search results. Use one of the commands below, depending on
your deployment method.

.. tabs::

.. group-tab:: Docker Compose

Without specifying CPU cores:

.. code-block:: console

$ docker compose run --rm zammad-railsserver bundle exec rake zammad:searchindex:rebuild

With specifying CPU cores to use (example: 8):

.. code-block:: console

$ docker compose run --rm zammad-railsserver bundle exec rake zammad:searchindex:rebuild[8]

.. group-tab:: Portainer

Open the :ref:`console via Portainer's GUI <docker-run-commands>` with
the standard entrypoint ``/bin/bash`` and run:

Without specifying CPU cores:

.. code-block:: console

$ bundle exec rake zammad:searchindex:rebuild

With specifying CPU cores to use (example: 8):

.. code-block:: console

$ bundle exec rake zammad:searchindex:rebuild[8]
48 changes: 24 additions & 24 deletions install/docker-compose.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,30 +149,7 @@ of the following methods by using ``bundle exec``.

.. tabs::

.. tab:: Via Portainer GUI

In your Portainer GUI, go to the container view and select the running
Rails container from your Zammad stack. Click on the **Exec Console**
icon in the "Quick Actions" column, select the standard ``/bin/bash``
entrypoint and click **Connect**.

.. figure:: /images/install/docker-compose/portainer/portainer-exec-console.png
:alt:
:width: 70%

Run the interactive Rails console by executing:

.. code-block:: console

$ bundle exec rails c

Directly execute a specific command:

.. code-block:: console

$ bundle exec rails r '...your rails command here...'

.. tab:: Via console
.. tab:: Docker Compose

Directly execute a specific command:

Expand All @@ -196,6 +173,29 @@ of the following methods by using ``bundle exec``.
for example ``pp`` (pretty print) in front of your Rails command. This
leads to an output in your terminal.

.. tab:: Portainer

In your Portainer GUI, go to the container view and select the running
Rails container from your Zammad stack. Click on the **Exec Console**
icon in the "Quick Actions" column, select the standard ``/bin/bash``
entrypoint and click **Connect**.

.. figure:: /images/install/docker-compose/portainer/portainer-exec-console.png
:alt:
:width: 70%

Run the interactive Rails console by executing:

.. code-block:: console

$ bundle exec rails c

Directly execute a specific command:

.. code-block:: console

$ bundle exec rails r '...your rails command here...'

Backup & Restore
----------------

Expand Down
Loading