Use the following command to configure a S3 repository to restore snapshot from:
curl -XPUT -H 'Content-Type: application/json' 'http://localhost:9200/_snapshot/s3-backup?pretty' -d'
{
"type" : "s3",
"settings" : {
"bucket" : "<bucketName>",
"region": "us-west-1",
"base_path" : "<someDirectory>" <=== This can be omitted if snapshots are located at root
}
}'
Use the following to list all snapshots in the configured repository:
curl -X GET "localhost:9200/_snapshot/s3-backup/_all/?pretty"
Use the following to restore a certain snapshot:
curl -X POST http://localhost:9200/_snapshot/s3-backup/<snapshotName>/_restore?pretty=true
Use the following to delete a snapshot from the repository:
curl -X DELETE "localhost:9200/_snapshot/s3-backup/<snapshotName>?pretty"