Skip to content

Commit 261a3a6

Browse files
authored
PBM-877 Added how to configure PBM remotely (#51)
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
1 parent d27e580 commit 261a3a6

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

docs/manage/configure-remotely.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Configure Percona Backup for MongoDB remotely
2+
3+
!!! admonition "Version added: 2.0.1"
4+
5+
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.
6+
7+
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.
8+
9+
Here’s how to configure Percona Backup for MongoDB remotely:
10+
11+
1. Create/update the configuration file (for example, `/etc/pbm_config.yaml`)
12+
2. Create an environment variable for the path to the configuration file
13+
14+
```sh
15+
export CONFIG_PATH="/etc/pbm_config.yaml"
16+
```
17+
18+
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:
19+
20+
* Connect to the existing container and pass the configuration:
21+
22+
```sh
23+
cat "$CONFIG_PATH" | docker compose exec -T $SERVICE_NAME pbm config --file="-"
24+
```
25+
26+
Replace the `$SERVICE_NAME` with your [service name](https://docs.docker.com/compose/compose-file/#services-top-level-element).
27+
28+
* Create a new container to pass the configuration and exit:
29+
30+
```sh
31+
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="-"
32+
```
33+
34+
Specify the valid PBM_MONGODB_URI connection string, the ID of the network the container will connect to and the container ID.
35+
36+
37+

mkdocs-base.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ nav:
139139
- Manage PBM:
140140
- Schedule backups:
141141
- manage/schedule-backup.md
142+
- 'Configure PBM remotely': 'manage/configure-remotely.md'
142143
- 'Upgrade PBM': 'manage/upgrading.md'
143144
- 'Troubleshoot PBM': 'manage/troubleshooting.md'
144145
- 'Automate access to S3 buckets for PBM': 'manage/automate-s3-access.md'

0 commit comments

Comments
 (0)