Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 17 additions & 4 deletions docs/install/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,23 @@ When you [install PCSM from repositories](repos.md), the environment file is cre

### Example environment file

```{.text .no-copy}
PCSM_SOURCE_URI="mongodb://source:mys3cretpAssword@mysource1:27017,mysource2:27017,mysource3:27017/"
PCSM_TARGET_URI="mongodb://target:tops3cr3t@mytarget1:27017,mytarget2:27017,mytarget3:27017/"
```
=== "Replica sets"

List all replica set members of the source and target clusters in the respective MongoDB connection string URIs to ensure {{pcsm.short}} can reach each of them:

```{.text .no-copy}
PLM_SOURCE_URI="mongodb://source:mys3cretpAssword@mysource1:27017,mysource2:27017,mysource3:27017/"
PLM_TARGET_URI="mongodb://target:tops3cr3t@mytarget1:27017,mytarget2:27017,mytarget3:27017/"
```

=== "Sharded clusters"

{{pcsm.short}} communicates with the clusters via `mongos`. Therefore, specify the hostname and port of the `mongos` instances of the source and target clusters in the respective MongoDB connection string URIs.

```{.text .no-copy}
PCSM_SOURCE_URI="mongodb://source-user:password@mongos-source1:27017/admin"
PCSM_TARGET_URI="mongodb://target-user:password@mongos-target1:27017/admin"
```

### Passwords with special characters

Expand Down
21 changes: 12 additions & 9 deletions docs/install/usage.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Use {{pcsm.full_name}}

{{pcsm.full_name}} doesn't automatically start data replication after the startup. It has the `idle` status indicating that it is ready to accept requests.
{{pcsm.full_name}} doesn't automatically start data replication after startup. It has the `idle` status indicating that it is ready to accept requests.

Check notice on line 3 in docs/install/usage.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/usage.md#L3

[Google.Contractions] Use 'it's' instead of 'it is'.
Raw output
{"message": "[Google.Contractions] Use 'it's' instead of 'it is'.", "location": {"path": "docs/install/usage.md", "range": {"start": {"line": 3, "column": 121}}}, "severity": "INFO"}

You can interact with {{pcsm.full_name}} using the command-line interface or via the HTTP API. Read more about [PCSM API](../api.md).
!!! tip "Understanding the workflow"

For an overview of how {{pcsm.short}} works and the replication workflow stages, see [How {{pcsm.full_name}} works](../intro.md).

You can interact with {{pcsm.full_name}} using the command-line interface or via the HTTP API. Read more about [{{pcsm.short}} HTTP API](../api.md).

## Before you start

Your target MongoDB cluster may be empty or contain data. PCSM replicates data from the source to the target but doesn't manage the target's data. If the target already has the same data as the source, PCSM overwrites it. However, if the target contains different data, PCSM doesn't delete it during replication. This leads to inconsistencies between the source and target. To ensure consistency, manually delete any existing data from the target before starting replication.
Your target MongoDB cluster may be empty or contain data. {{pcsm.short}} replicates data from the source to the target but doesn't manage the target's data. If the target already has the same data as the source, {{pcsm.short}} overwrites it. However, if the target contains different data, {{pcsm.short}} doesn't delete it during replication. This leads to inconsistencies between the source and target. To ensure consistency, manually delete any existing data from the target before starting replication.

## Start the replication

Start the replication process between source and target clusters. PCSM starts copying the data from the source to the target. First it does the initial sync by cloning the data and then applying all the changes that happened since the clone start.
Start the replication process between source and target clusters. {{pcsm.short}} starts copying the data from the source to the target. First it does the initial sync by cloning the data and then applying all the changes that happened since the clone start.

Then it uses the [change streams :octicons-link-external-16:](https://www.mongodb.com/docs/manual/changeStreams/) to track the changes to your data on the source and replicate them to the target.
Then it uses [change streams :octicons-link-external-16:](https://www.mongodb.com/docs/manual/changeStreams/) to track changes on the source and replicate them to the target.

=== "Command line"

Expand Down Expand Up @@ -74,7 +78,7 @@

## Pause the replication

You can pause the replication at any moment. PCSM stops the replication, saves the timestamp and enters the `paused` state. PCSM uses the saved timestamp after you [resume the replication](#resume-the-replication).
You can pause the replication at any moment. {{pcsm.short}} stops the replication, saves the timestamp, and enters the `paused` state. {{pcsm.short}} uses the saved timestamp after you [resume the replication](#resume-the-replication).

=== "Command line"

Expand All @@ -92,7 +96,7 @@

## Resume the replication

Resume the replication. PCSM changes the state to `running` and copies the changes that occurred to the data from the timestamp it saved when you paused the replication. Then it continues monitoring the data changes and replicating them real-time.
Resume the replication. {{pcsm.short}} changes the state to `running` and copies the changes that occurred from the timestamp it saved when you paused the replication. Then it continues monitoring data changes and replicating them in real time.

=== "Command line"

Expand Down Expand Up @@ -147,8 +151,7 @@

## Finalize the replication

When you no longer need / want to replicate data, finalize the replication. PCSM stops replication, creates the required indexes on the target, and stops. This is a one-time operation. You cannot restart the replication after you finalized it. If you run the `start` command, PCSM will start the replication anew, with the initial sync.

When you no longer need / want to replicate data, finalize the replication. {{pcsm.short}} stops replication, creates the required indexes on the target, and stops. This is a one-time operation. You cannot restart the replication after you finalized it. If you run the `start` command, {{pcsm.short}} will start the replication anew, with the initial sync.

Check notice on line 154 in docs/install/usage.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/usage.md#L154

[Google.Contractions] Use 'can't' instead of 'cannot'.
Raw output
{"message": "[Google.Contractions] Use 'can't' instead of 'cannot'.", "location": {"path": "docs/install/usage.md", "range": {"start": {"line": 154, "column": 200}}}, "severity": "INFO"}

Check warning on line 154 in docs/install/usage.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/usage.md#L154

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

=== "Command line"

Expand Down
Loading