: Add documentation details for how to run custom database dump commands using binaries from running containers (#906).
All checks were successful
build / test (push) Successful in 4m3s
build / docs (push) Successful in 1m6s

This commit is contained in:
Dan Helfman 2024-08-20 15:03:49 -07:00
parent 1fb943e5f1
commit 288a4bf243
3 changed files with 23 additions and 22 deletions

3
NEWS
View File

@ -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

View File

@ -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

View File

@ -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: