diff --git a/NEWS b/NEWS index 4633e45d..a55fd95e 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ https://torsion.org/borgmatic/docs/reference/configuration/ * #905: Fix the "source_directories_must_exist" option to work with relative "source_directories" paths when a "working_directory" is set. + * #906: Add documentation details for how to run custom database dump commands using binaries from + running containers: + https://torsion.org/borgmatic/docs/how-to/backup-your-databases/#containers * Fix a regression in which the "color" option had no effect. * Add a recent contributors section to the documentation, because credit where credit's due! See: https://torsion.org/borgmatic/#recent-contributors diff --git a/borgmatic/config/schema.yaml b/borgmatic/config/schema.yaml index cfbaa732..79e2aac5 100644 --- a/borgmatic/config/schema.yaml +++ b/borgmatic/config/schema.yaml @@ -1044,12 +1044,12 @@ properties: description: | Command to use instead of "pg_dump" or "pg_dumpall". This can be used to run a specific pg_dump version - (e.g., one inside a running container). - If you run it from within a container, make sure to - mount your host ".borgmatic" folder inside - the container with the same directory structure. - Defaults to "pg_dump" for single database dump - or "pg_dumpall" to dump all databases. + (e.g., one inside a running container). If you run it + from within a container, make sure to mount your + host's ".borgmatic" folder into the container using + the same directory structure. Defaults to "pg_dump" + for single database dump or "pg_dumpall" to dump all + databases. example: docker exec my_pg_container pg_dump pg_restore_command: type: string @@ -1163,11 +1163,10 @@ properties: description: | Command to use instead of "mariadb-dump". This can be used to run a specific mariadb_dump version (e.g., one - inside a running container). - If you run it from within a container, make sure to - mount your host ".borgmatic" folder inside - the container with the same directory structure. - Defaults to "mariadb-dump". + inside a running container). If you run it from within + a container, make sure to mount your host's + ".borgmatic" folder into the container using the same + directory structure. Defaults to "mariadb-dump". example: docker exec mariadb_container mariadb-dump mariadb_command: type: string @@ -1295,13 +1294,12 @@ properties: mysql_dump_command: type: string description: | - Command to use instead of "mysqldump". This can be used - to run a specific mysql_dump version (e.g., one inside a - running container). - If you run it from within a container, make sure to - mount your host ".borgmatic" folder inside - the container with the same directory structure. - Defaults to "mysqldump". + Command to use instead of "mysqldump". This can be + used to run a specific mysql_dump version (e.g., one + inside a running container). If you run it from within + a container, make sure to mount your host's + ".borgmatic" folder into the container using the same + directory structure. Defaults to "mysqldump". example: docker exec mysql_container mysqldump mysql_command: type: string diff --git a/docs/how-to/backup-your-databases.md b/docs/how-to/backup-your-databases.md index 094bcb94..96eb081b 100644 --- a/docs/how-to/backup-your-databases.md +++ b/docs/how-to/backup-your-databases.md @@ -229,10 +229,10 @@ hooks: ... where `my_pg_container` is the name of your database container. In this example, you'd also need to set the `pg_restore_command` and `psql_command` -options. If you choose to use the `pg_dump` within the container though, -note that it tries to output the backup to a file inside the container. -So you'll have to mount the `.borgmatic` folder inside your home folder -with the same directory structure inside the container. +options. If you choose to use the `pg_dump` command within the container +though, note that it will output the database dump to a file inside the +container. So you'll have to mount the `.borgmatic` folder from your host's +home folder into the container using the same directory structure. See the following Docker compose file an as example: