diff --git a/docs/install/docker.md b/docs/install/docker.md index dd68efe8..e71bb817 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -10,6 +10,11 @@ For more information about using Docker, see the [Docker Docs](https://docs.dock 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). +* [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. + ## Start Percona Backup for MongoDB Start Percona Backup for MongoDB container with the following command: @@ -23,7 +28,7 @@ Where: * `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). 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. @@ -34,16 +39,22 @@ Percona Backup for MongoDB requires the remote storage where to store data. Use 1. Start a Bash session: ```{.bash data-prompt="$"} - $ docker run --name bash + $ docker exec -it -u root --name bash ``` -2. Create a YAML configuration file: +2. Download the editor of your choice. In this example, let's use Vim + + ```{.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): ```yaml storage: @@ -56,12 +67,14 @@ Percona Backup for MongoDB requires the remote storage where to store data. Use secret-access-key: ``` -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. @@ -69,7 +82,7 @@ Percona Backup for MongoDB command line utility (`pbm`) provides the set of comm For example, to start a backup, use the following command: ```{.bash data-prompt="$"} -$ docker run --name pbm backup +$ docker exec -it --name pbm backup ``` where `` is the name you assigned to the container and `pbm backup` is the command to start a backup.