diff --git a/NEWS b/NEWS index 762cebd3..38748947 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,9 @@ 2.0.8.dev0 - * #1116: Add support for dumping database containers via their container name. - * #1116: Add support for database backup labels. * #1114: Document systemd configuration changes for the ZFS filesystem hook. + * #1116: Add dumping of database containers via their container names, handy for backing up + database containers from the host. See the documentation for more information: + https://torsion.org/borgmatic/docs/how-to/backup-your-databases/#database-client-on-the-host + * #1116: Add optional database labels to make it easier to find your dumps within a Borg archive. * #1118: Fix a bug in which Borg hangs during database backup when different filesystems are in use. * #1122: To prevent the user from inadvertently excluding the "bootstrap" action's manifest, always diff --git a/docs/how-to/backup-your-databases.md b/docs/how-to/backup-your-databases.md index dc67691e..807a54ac 100644 --- a/docs/how-to/backup-your-databases.md +++ b/docs/how-to/backup-your-databases.md @@ -214,8 +214,10 @@ these options in the `hooks:` section of your configuration. #### Database client on the host -But what if borgmatic is running on the host? You can connect to the database -container by specifying its container name or id: +But what if borgmatic is running on the host? + +New in version 2.0.8 You can +connect to the database container by specifying its container name or ID: ```yaml postgresql_databases: @@ -226,8 +228,16 @@ postgresql_databases: password: trustsome1 ``` -Now borgmatic will use the `docker`/`podman` CLI to figure out the container IP. -Alternatively you can publish your container ports to the host. +borgmatic uses the `docker`/`podman` CLI to figure out the container IP to +connect to. But `container:` does not work when borgmatic itself is running in a +container; in that case, use `hostname:` as described above. + +Prior to version 2.0.8 If you're +running an older version of borgmatic on the host, you can publish your database +container ports to the host (e.g. via `docker run --publish` or Compose's +`ports`)—and then configure borgmatic to connect to `localhost` and the +published port. + #### Database client in a running container