From e335f92e7541d481e8896f0c5b43bd2af86d8e97 Mon Sep 17 00:00:00 2001 From: hc-github-team-secure-vault-core <82990506+hc-github-team-secure-vault-core@users.noreply.github.com> Date: Tue, 11 Jul 2023 16:00:03 -0400 Subject: [PATCH] backport of commit 237b9f71409e99d24daae3ef196c02e34a908126 (#21660) Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com> --- .../system/replication/replication-dr.mdx | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/website/content/api-docs/system/replication/replication-dr.mdx b/website/content/api-docs/system/replication/replication-dr.mdx index cb37e17de..e3ba21766 100644 --- a/website/content/api-docs/system/replication/replication-dr.mdx +++ b/website/content/api-docs/system/replication/replication-dr.mdx @@ -672,3 +672,56 @@ $ curl \ --data @payload.json \ http://127.0.0.1:8200/v1/sys/replication/dr/secondary/operation-token/delete ``` + +## Reindex Replication + +This endpoint reindexes the local data storage. This can cause a very long delay +depending on the number and size of objects in the data store. + +**This endpoint requires a disaster recovery operation token.** + +| Method | Path | +| :----- | :--------------------------------------- | +| `POST` | `/sys/replication/dr/secondary/reindex` | + +### Parameters + +- `diff` `(bool: false)` – Enables a slower re-indexing which will perform a key + level check to diagnose issues. Defaults false. + +- `force` `(bool: false)` – Forces a complete re-indexing which only scans data + available in the storage. Defaults false. + +- `skip_flush` `(bool: false)` – Skips the tree flushing stage of the reindex + process. This setting can be used to reduce the amount of time the tree is locked + during a reindex process. If this node is killed before the full tree has been + asynchronously flushed the reindex may not have applied fully and a new reindex + may need to be done. Defaults false. + +- `dr_operation_token` `(string: )` - DR operation token used to authorize + this request. + +### Sample Payload + +```json +{ + "dr_operation_token": "..." +} +``` + +### Sample Request + +```shell-session +$ curl \ + --header "X-Vault-Token: ..." \ + --request POST \ + http://127.0.0.1:8200/v1/sys/replication/dr/secondary/reindex +``` + +### Sample Response + +```json +{ + "warnings": ["..."] +} +``` \ No newline at end of file