diff --git a/appendix/backup-and-restore/docker-compose.rst b/appendix/backup-and-restore/docker-compose.rst index efa754fb..0c8ca679 100644 --- a/appendix/backup-and-restore/docker-compose.rst +++ b/appendix/backup-and-restore/docker-compose.rst @@ -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 ` 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 ------- @@ -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 ` 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] diff --git a/install/docker-compose.rst b/install/docker-compose.rst index 5e1aefd4..29abc9ff 100644 --- a/install/docker-compose.rst +++ b/install/docker-compose.rst @@ -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: @@ -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 ----------------