...
Create a Snapshot Repository
You need to create a snapshot repository where the snapshots will be stored. This can be a shared file system or an S3 bucket.
Using a Shared File System:
First, specify the shared repository location in theelasticsearch.yml
file:Code Block path.repo: "/mount/backups/my_backup"
Then, create the repository using the following command:
Code Block curl -X PUT "http://<es_node_ip>:9200/_snapshot/my_backup" -H 'Content-Type: application/json' -d' { "type": "fs", "settings": { "location": "/mount/backups/my_backup" } }'
Using DataCore Swarm S3 bucket:
When the target repository is another Swarm cluster, the command to create the snapshot repository would be as follows:Code Block curl -X PUT "http://<es_node_ip>:9200/_snapshot/my_s3_backup" -H 'Content-Type: application/json' -d' { "type": "s3", "settings": { "bucket": "my-elasticsearch-backup-bucket", "endpoint": "https://datacore-swarm.example.com", "access_key": "your_access_key", "secret_key": "your_secret_key", "protocol": "https" } }'
...