From adfc6539cabc1907e3f975fc1ac869180768f5a3 Mon Sep 17 00:00:00 2001
From: Roman Khavronenko <roman@victoriametrics.com>
Date: Fri, 14 Jul 2023 10:52:39 +0200
Subject: [PATCH] vmctl: mention replicationFactor during migration (#4633)

Addresses https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4624

Signed-off-by: hagen1778 <roman@victoriametrics.com>
---
 app/vmctl/README.md | 7 ++++++-
 docs/vmctl.md       | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/app/vmctl/README.md b/app/vmctl/README.md
index a040ccd5de..d51b490a93 100644
--- a/app/vmctl/README.md
+++ b/app/vmctl/README.md
@@ -799,7 +799,12 @@ Or manually specify addresses according to [URL format](https://docs.victoriamet
     --vm-native-src-addr=http://<src-vmselect>:8481/select/0/prometheus
     --vm-native-dst-addr=http://<dst-vminsert>:8480/insert/0/prometheus
     ```
-6. Migration speed can be adjusted via `--vm-concurrency` cmd-line flag, which controls the number of concurrent 
+6. Migrating data from VM cluster which had replication (`-replicationFactor` > 1) enabled won't produce the same amount
+of data copies for the destination database, and will result only in creating duplicates. To remove duplicates,
+destination database need to be configured with `-dedup.minScrapeInterval=1ms`. To restore the replication factor
+the destination `vminsert` component need to be configured with the according `-replicationFactor` value. 
+See more about replication [here](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#replication-and-data-safety).
+7. Migration speed can be adjusted via `--vm-concurrency` cmd-line flag, which controls the number of concurrent 
 workers busy with processing. Please note, that each worker can load up to a single vCPU core on VictoriaMetrics. 
 So try to set it according to allocated CPU resources of your VictoriaMetrics destination installation.
 7. Migration is a backfilling process, so it is recommended to read
diff --git a/docs/vmctl.md b/docs/vmctl.md
index 7ee2139122..75893d311f 100644
--- a/docs/vmctl.md
+++ b/docs/vmctl.md
@@ -810,7 +810,12 @@ Or manually specify addresses according to [URL format](https://docs.victoriamet
     --vm-native-src-addr=http://<src-vmselect>:8481/select/0/prometheus
     --vm-native-dst-addr=http://<dst-vminsert>:8480/insert/0/prometheus
     ```
-6. Migration speed can be adjusted via `--vm-concurrency` cmd-line flag, which controls the number of concurrent 
+6. Migrating data from VM cluster which had replication (`-replicationFactor` > 1) enabled won't produce the same amount
+of data copies for the destination database, and will result only in creating duplicates. To remove duplicates,
+destination database need to be configured with `-dedup.minScrapeInterval=1ms`. To restore the replication factor
+the destination `vminsert` component need to be configured with the according `-replicationFactor` value. 
+See more about replication [here](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#replication-and-data-safety).
+7. Migration speed can be adjusted via `--vm-concurrency` cmd-line flag, which controls the number of concurrent 
 workers busy with processing. Please note, that each worker can load up to a single vCPU core on VictoriaMetrics. 
 So try to set it according to allocated CPU resources of your VictoriaMetrics destination installation.
 7. Migration is a backfilling process, so it is recommended to read