Taking snapshots

Once the repository is set up, we can put named snapshots into a specific repository:

curl -XPUT 'http://localhost:9200/_snapshot/backups/backup_201905271530?pretty' -H 'Content-Type: application/json' -d'
{
"indices": "bigginsight,logstash-*",
"ignore_unavailable": true,
"include_global_state": false
}
'

In this command, we specified that we want a snapshot to be taken in the repository backups with the name backup_201905271530The name of the snapshot could be anything, but it should help you identify the snapshot at a later stage. One typical strategy would be to take a snapshot every 30 minutes and set snapshot names with prefixes such as backup_yyyyMMddHHmm. In the event of any failure, you could then identify the snapshot that can be restored.

Snapshots are incremental by default. They don't store all the redundant data in all snapshots.

Having taken the snapshots periodically, you would want to list all the snapshots that exist in a repository. This can be done using the following command:

curl -XGET 'http://localhost:9200/_snapshot/backups/_all?pretty'
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.55.151