Bird
Raised Fist0

You want to restore only specific indexes from a snapshot but rename them to avoid conflicts. Which JSON snippet correctly does this during restore?

hard🚀 Application Q15 of Q15
Elasticsearch - Cluster Management
You want to restore only specific indexes from a snapshot but rename them to avoid conflicts. Which JSON snippet correctly does this during restore?
{
  "indices": "logs-2023,metrics-2023",
  "rename_pattern": "(.*)-2023",
  "rename_replacement": "$1-restore"
}
ARestores only logs-restore and metrics-restore indexes from snapshot
BRestores logs-2023 and metrics-2023 with original names
CRestores all indexes in snapshot renamed with -restore suffix
DRestores logs-2023 and metrics-2023 as logs-restore and metrics-restore
Step-by-Step Solution
Solution:
  1. Step 1: Analyze indices and rename_pattern

    Indices "logs-2023" and "metrics-2023" match the pattern "(.*)-2023" capturing "logs" and "metrics".
  2. Step 2: Apply rename_replacement

    Replacement "$1-restore" changes names to "logs-restore" and "metrics-restore".
  3. Step 3: Confirm only specified indices restored

    Only indices listed in "indices" are restored, renamed as specified.
  4. Final Answer:

    Restores logs-2023 and metrics-2023 as logs-restore and metrics-restore -> Option D
  5. Quick Check:

    Indices filtered + renamed correctly = Restores logs-2023 and metrics-2023 as logs-restore and metrics-restore [OK]
Quick Trick: Use indices + rename_pattern/replacement to rename on restore [OK]
Common Mistakes:
MISTAKES
  • Restoring all snapshot indices ignoring filter
  • Not using rename_pattern correctly
  • Expecting renamed indexes to exist before restore

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes