Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBM-1214 Fixed Docker instructions #144

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions docs/install/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

By default, Docker will pull the image from Docker Hub if it is not available locally.

## Prerequisites

* You need to deploy MongoDB or Percona Server for MongoDB. See [what MongoDB deployments are supported](../details/deployments.md).

Check notice on line 15 in docs/install/docker.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/docker.md#L15

[Google.Passive] In general, use active voice instead of passive voice ('are supported').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('are supported').", "location": {"path": "docs/install/docker.md", "range": {"start": {"line": 15, "column": 91}}}, "severity": "INFO"}
* [Create the pbm user](initial-setup.md#create-the-pbm-user) in your deployment. You will need this user credentials to start Percona Backup for MongoDB container.

Check warning on line 16 in docs/install/docker.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/docker.md#L16

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/install/docker.md", "range": {"start": {"line": 16, "column": 87}}}, "severity": "WARNING"}

## Start Percona Backup for MongoDB

Start Percona Backup for MongoDB container with the following command:
Expand All @@ -23,7 +28,7 @@

* `container-name` is the name you want to assign to your container.
* `PBM_MONGODB-URI` is a [MongoDB Connection URI](https://docs.mongodb.com/manual/reference/connection-string/) string used to connect to MongoDB nodes. See the [Initial setup](initial-setup.md) how to create the PBM user.
* `tag-multi` is the tag specifying the version you need. For example, `2.3.0-multi`. The `multi` part of the tag serves to identify the architecture (x86_64 or ARM64) and pull the respective image. See the [full list of tags](https://hub.docker.com/r/perconalab/percona-backup-mongodb/tags).
* `tag-multi` is the tag specifying the version you need. For example, `{{release}}-multi`. The `multi` part of the tag serves to identify the architecture (x86_64 or ARM64) and pull the respective image. See the [full list of tags](https://hub.docker.com/r/perconalab/percona-backup-mongodb/tags).

Check notice on line 31 in docs/install/docker.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/docker.md#L31

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/install/docker.md", "range": {"start": {"line": 31, "column": 157}}}, "severity": "INFO"}

Note that every MongoDB node (including replica set secondary members and config server replica set nodes) requires a separate instance of Percona Backup for MongoDB. Thus, a typical, 3-node MongoDB replica set requires three instances of Percona Backup for MongoDB.

Expand All @@ -34,16 +39,22 @@
1. Start a Bash session:

```{.bash data-prompt="$"}
$ docker run --name <container-name> bash
$ docker exec -it -u root --name <container-name> bash
```

2. Create a YAML configuration file:
2. Download the editor of your choice. In this example, let's use Vim

Check warning on line 45 in docs/install/docker.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/docker.md#L45

[Google.We] Try to avoid using first-person plural like 'let's'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'let's'.", "location": {"path": "docs/install/docker.md", "range": {"start": {"line": 45, "column": 57}}}, "severity": "WARNING"}

```{.bash data-prompt="$"}
$ microdnf install vim
```

3. Create a YAML configuration file:

```{.bash data-prompt="$"}
$ touch /tmp/pbm_config.yaml
$ vim /tmp/pbm_config.yaml
```

3. Specify remote storage parameters in the config file. The following example is for S3-compatible backup storage. Check what [other storages are supported](../details/storage-configuration.md):
4. Specify remote storage parameters in the config file. The following example is for S3-compatible backup storage. Check what [other storages are supported](../details/storage-configuration.md) and [examples of storage configurations](../details/storage-config-example.md):

Check failure on line 57 in docs/install/docker.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/docker.md#L57

[Vale.Spelling] Did you really mean 'storages'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'storages'?", "location": {"path": "docs/install/docker.md", "range": {"start": {"line": 57, "column": 135}}}, "severity": "ERROR"}

Check notice on line 57 in docs/install/docker.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/docker.md#L57

[Google.Passive] In general, use active voice instead of passive voice ('are supported').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('are supported').", "location": {"path": "docs/install/docker.md", "range": {"start": {"line": 57, "column": 144}}}, "severity": "INFO"}

```yaml
storage:
Expand All @@ -56,20 +67,22 @@
secret-access-key: <your-secret-key-here>
```

4. Upload the config file:
5. Upload the config file:

```{.bash data-prompt="$"}
$ pbm config --file /tmp/pbm_config.yaml
```

The command output displays your uploaded configuration.

## Run Percona Backup for MongoDB

Percona Backup for MongoDB command line utility (`pbm`) provides the set of commands to control backups: create, restore, cancel backups, etc.

For example, to start a backup, use the following command:

```{.bash data-prompt="$"}
$ docker run --name <container-name> pbm backup
$ docker exec -it --name <container-name> pbm backup
```

where `<container-name>` is the name you assigned to the container and `pbm backup` is the command to start a backup.
Expand Down