In order to make this work on Windows, we need to adapt the commands listed there a little bit. The steps then would be:
- Create a destination directory for the backups, e.g. at
installdir/elasticsearch/config/elasticsearch.yml file accordingly:
- Restart the Elasticsearch service using the graphical manager.
- Repository initialization: we will write the JSON payload to a file instead of providing it in the command line.
- Open a command prompt.
notepad payload.json, and write the following contents:
- Initializate the repository with the following command:
curl -XPUT -d @payload.json -H "Content-Type: application/json" "http://localhost:9200/_snapshot/my_backup"
- Finally start the backup process:
curl -XPUT "localhost:9200/_snapshot/my_backup/snapshot_1?wait_for_completion=true&pretty"