Snapshotting and Restoring Data in Elasticsearch 7.13

2 hours
  • 4 Learning Objectives

About this Hands-on Lab

As with any data storage technology, backing up and restoring data is critical to ensuring data availability. Elasticsearch is highly fault tolerant and redundant but accidents can still happen. In this hands-on lab, you will get to use the snapshot and restore APIs to back up and restore Elasticsearch data.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create the accounts Snapshot Repository

From the Kibana console, create a new filesystem-type snapshot repository called accounts for the filesystem location /mnt/backups/accounts.

Create the accounts_test_backup Snapshot of the accounts Index

From the Kibana console, create the accounts_test_backup snapshot of the accounts index including the global state.

Restore the accounts Index from the accounts_test_backup Snapshot

From the Kibana console, restore the accounts index from the accounts_test_backup snapshot as the index accounts_test_restore.

Mount the accounts Index from the accounts_test_backup Snapshot

From the Kibana console, mount the accounts index from the accounts_test_backup snapshot as the index accounts_text_backup so that it becomes a searchable snapshot.

Additional Resources

Logging In to the Elastic Environment

  1. Open a new browser tab and navigate to the public IP address of the es1 node provided on the lab page (e.g., http://public_ip).
  2. Log in using the username elastic and password elastic_acg.

Scenario

You work as a data infrastructure engineer for an online bank who uses Elasticsearch as a NoSQL database. You've been tasked with demonstrating the capability and data integrity of backing up and restoring the accounts index as part of an audit process. For this, you will need to create a new filesystem-type snapshot repository called accounts at the filesystem location /mnt/backups/accounts. Then you need to create the accounts_test_backup snapshot of the accounts index, including the global cluster state. Once the accounts_test_backup snapshot is created, you need to restore the accounts index from it as the index accounts_test_restore.

Now, because the accounts index could have changed since we took a snapshot of it, in order to verify data integrity throughout the backup and restore process, we need to compare the accounts_test_restore index to the accounts index from the accounts_test_backup snapshot. To do this, you need to mount the accounts index from the accounts_test_backup snapshot as the index accounts_test_backup to make it a readable snapshot so it can be compared to the accounts_test_restore index to complete the audit process.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?