Skip to content

Commit

Permalink
Update create-repository.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Naarcha-AWS authored Jul 30, 2024
1 parent 3013b74 commit e2a1d02
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions _api-reference/snapshots/create-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@ PUT /_snapshot/my-first-repo/

Parameter | Data type | Description
:--- | :--- | :---
repository | String | Repository name |
`repository` | String | Repository name |

## Request parameters

Request parameters depend on the type of repository: `fs` or `s3`.

### common parameters
### Common parameters

The following table lists parameters that can be used with both the `fs` and `s3` repositories.

Request field | Description
:--- | :---
`prefix_mode_verification` | When enabled, it will add hashed value of a random seed to the prefix for repository verification. For remote store enabled clusters, a user can add `setting.prefix_mode_verification` to the node attributes for the supplied repository. This will also work for existing repository when supplied. Optional.
`prefix_mode_verification` | When enabled, adds a hashed value of a random seed to the prefix for repository verification. For remote store enabled clusters, you can add the `setting.prefix_mode_verification` setting to the node attributes for the supplied repository. This field works with both existing and new repositories. Optional.

### fs repository

Expand All @@ -53,20 +56,6 @@ Request field | Description
`remote_store_index_shallow_copy` | Boolean | Determines whether the snapshot of the remote store indexes are captured as a shallow copy. Default is `false`.
`readonly` | Whether the repository is read-only. Useful when migrating from one cluster (`"readonly": false` when registering) to another cluster (`"readonly": true` when registering). Optional.

## Example request

The following example registers an `fs` repository using the local directory `/mnt/snapshots` as `location`.

```json
PUT /_snapshot/my-fs-repository
{
"type": "fs",
"settings": {
"location": "/mnt/snapshots"
}
}
```
{% include copy-curl.html %}

#### s3 repository

Expand All @@ -90,7 +79,25 @@ Request field | Description
For the `base_path` parameter, do not enter the `s3://` prefix when entering your S3 bucket details. Only the name of the bucket is required.
{: .note}

## Example request
## Example requests

### `fs`

Check failure on line 84 in _api-reference/snapshots/create-repository.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.StackedHeadings] Do not stack headings. Insert an introductory sentence between headings. Raw Output: {"message": "[OpenSearch.StackedHeadings] Do not stack headings. Insert an introductory sentence between headings.", "location": {"path": "_api-reference/snapshots/create-repository.md", "range": {"start": {"line": 84, "column": 1}}}, "severity": "ERROR"}

The following example registers an `fs` repository using the local directory `/mnt/snapshots` as `location`.

```json
PUT /_snapshot/my-fs-repository
{
"type": "fs",
"settings": {
"location": "/mnt/snapshots"
}
}
```
{% include copy-curl.html %}

### `s3`


The following request registers a new S3 repository called `my-opensearch-repo` in an existing bucket called `my-open-search-bucket`. By default, all snapshots are stored in the `my/snapshot/directory`.

Expand Down

0 comments on commit e2a1d02

Please sign in to comment.