Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a snapshot repository named 'my_backup'.
Elasticsearch
PUT /_snapshot/[1] { "type": "fs", "settings": { "location": "/mount/backups/my_backup" } }
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different repository name in the URL and settings.
Misspelling the repository name.
✗ Incorrect
The repository name must match the one used in the PUT request URL to create it.
2fill in blank
mediumComplete the code to create a snapshot named 'snapshot_1' in the 'my_backup' repository.
Elasticsearch
PUT /_snapshot/my_backup/[1] { "indices": "index1,index2", "ignore_unavailable": true, "include_global_state": false }
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the repository name instead of the snapshot name.
Using an invalid snapshot name.
✗ Incorrect
The snapshot name is specified in the URL after the repository name.
3fill in blank
hardFix the error in the restore request to restore 'snapshot_1' from 'my_backup' repository.
Elasticsearch
POST /_snapshot/my_backup/[1]/_restore { "indices": "index1", "rename_pattern": "index1", "rename_replacement": "restored_index1" }
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the repository name instead of the snapshot name in the URL.
Using a non-existent snapshot name.
✗ Incorrect
The snapshot name must be used in the restore URL to specify which snapshot to restore.
4fill in blank
hardFill both blanks to create a snapshot that includes only 'logs-*' indices and excludes global state.
Elasticsearch
PUT /_snapshot/my_backup/[1] { "indices": "[2]", "include_global_state": false }
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a generic snapshot name that doesn't match the indices.
Including global state when it should be excluded.
✗ Incorrect
The snapshot name is 'snapshot_logs' and the indices pattern is 'logs-*' to include only log indices.
5fill in blank
hardFill all three blanks to restore 'snapshot_logs' from 'my_backup' repository, renaming 'logs-2023' to 'restored-logs-2023' and ignoring unavailable indices.
Elasticsearch
POST /_snapshot/my_backup/[1]/_restore { "indices": "[2]", "rename_pattern": "[3]", "rename_replacement": "restored-logs-2023", "ignore_unavailable": true }
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect snapshot or index names.
Not matching the rename pattern to the index name.
✗ Incorrect
The snapshot name is 'snapshot_logs', the indices to restore is 'logs-2023', and the rename pattern matches the original index name.