Skip to content

Commit

Permalink
PBM-877 Added how to configure PBM remotely (#51)
Browse files Browse the repository at this point in the history
PBM-877 Added how to configure PBM remotely

new file:   docs/manage/configure-remotely.md
modified:   docs/release-notes/2.0.0.md
modified:   mkdocs-base.yml
  • Loading branch information
nastena1606 authored Oct 12, 2022
1 parent d27e580 commit 261a3a6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/manage/configure-remotely.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Configure Percona Backup for MongoDB remotely

!!! admonition "Version added: 2.0.1"

To apply or update the configuration, Percona Backup for MongoDB reads the configuration file on the filesystem. When running Percona Backup for MongoDB remotely (in a cloud as Docker containers or pods in Kubernetes), you must upload the configuration file to the remote host's filesystem.

Starting with version 2.0.1, you can configure Percona Backup for MongoDB remotely. You manage the configuration file locally and use the pipeline to pass the file's contents to Percona Backup for MongoDB on a remote host/running in a container. As a result, your DBAs spend less time on administering Percona Backup for MongoDB and can focus on other activities instead.

Here’s how to configure Percona Backup for MongoDB remotely:

1. Create/update the configuration file (for example, `/etc/pbm_config.yaml`)
2. Create an environment variable for the path to the configuration file

```sh
export CONFIG_PATH="/etc/pbm_config.yaml"
```

3. Pass the configuration file contents to Percona Backup for MongoDB. For example, if you run Percona Backup for MongoDB in Docker, use one of the following commands:

* Connect to the existing container and pass the configuration:

```sh
cat "$CONFIG_PATH" | docker compose exec -T $SERVICE_NAME pbm config --file="-"
```

Replace the `$SERVICE_NAME` with your [service name](https://docs.docker.com/compose/compose-file/#services-top-level-element).

* Create a new container to pass the configuration and exit:

```sh
cat "$CONFIG_PATH" | docker run -i --env PBM_MONGODB_URI="mongodb://<PBM_USER>:<PBM_USER_PASSWORD>@<HOST>:<PORT>" --network=$NET_ID $CONTAINER_ID pbm config --file="-"
```

Specify the valid PBM_MONGODB_URI connection string, the ID of the network the container will connect to and the container ID.



1 change: 1 addition & 0 deletions mkdocs-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ nav:
- Manage PBM:
- Schedule backups:
- manage/schedule-backup.md
- 'Configure PBM remotely': 'manage/configure-remotely.md'
- 'Upgrade PBM': 'manage/upgrading.md'
- 'Troubleshoot PBM': 'manage/troubleshooting.md'
- 'Automate access to S3 buckets for PBM': 'manage/automate-s3-access.md'
Expand Down

0 comments on commit 261a3a6

Please sign in to comment.