Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqldump-secure: documentation and multi-php fix. #995

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
11 changes: 11 additions & 0 deletions compose/docker-compose.override.yml-php-multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -65,6 +66,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -79,6 +81,7 @@ services:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-5.6:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-5.6:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/cfg/php-startup-5.6:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
Expand All @@ -101,6 +104,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -119,6 +123,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -137,6 +142,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -155,6 +161,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -173,6 +180,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -191,6 +199,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -209,6 +218,7 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

Expand All @@ -227,5 +237,6 @@ services:
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
20 changes: 20 additions & 0 deletions docs/configuration-files/env-file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,26 @@ be able to display information inside the bundled intranet.
Keep this variable in sync with the actual MySQL root password.


MySQL Dump Secure
-----------------

.. _env_mysql_dump_secure:

Those variables are used on ``docker-entrypoint`` in order to create a ``cnf`` file for the ``mysqldump-secure`` command.
By default they should work correctly for the PHP container specified in ``.env`` but if they are left undeclared in multi-php setup,
the other PHP containers would not be able to dump the database correctly.

+-------------------------+-------------------+---------------------+
| Name | Allowed values | Default value |
+=========================+===================+=====================+
| ``MYSQL_BACKUP_USER`` | any string | none |
+-------------------------+-------------------+---------------------+
| ``MYSQL_BACKUP_PASS`` | any string | none |
+-------------------------+-------------------+---------------------+
| ``MYSQL_BACKUP_HOST`` | any string | none |
+-------------------------+-------------------+---------------------+


PostgreSQL
----------

Expand Down
4 changes: 4 additions & 0 deletions docs/maintenance/backup-and-restore-mysql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ dump date, dump options as well as the server version it came from.
Mysqldump-secure
----------------

.. note::
On multi-PHP setup make sure you have the :ref:`following variables <env_mysql_dump_secure>` declared.
In case they are missing the ``mysqldump-secure`` command will fail on PHP containers other than the default.

|ext_lnk_tool_mysqldump_secure| is bundled, setup and ready to use in every PHP container.
You can run it without any arguments and it will dump each available database as a
separated compressed file. Backups will be located in ``./backups/mysql/`` inside the Devilbox
Expand Down