Restore to a different cluster

Hi,

Good day!

I have a Production Environment (3 Nodes) and a DR Environment (3 Nodes). I received the error "snapshot does not exist" on the DR Environment after trying to restore the snapshot of the Production on the DR Environment. These are the steps I executed before restoring:

  1. Registered a repository named "backup" on the Production and DR Environment
  2. Created a snapshot of the Production Environment

H

It'd be good if you shared the exact steps you used here, ie the commands you used.

Hi @warkolm, here

  1. Registered the repository in the Production Environment
curl -k -u elastic:admin123 -X PUT 'https://esnode1.localdomain:9200/_snapshot/my-app-backup' -H 'Content-Type: application/json' -d'
{
  "type": "fs",
  "settings": {
    "compress": "true",
    "location": "/mnt/backup"
  }
}
'
  1. Registered the repository in the DR Environment
curl -k -u elastic:admin123 -X PUT 'https://dresnode1.localdomain:9200/_snapshot/my-app-backup' -H 'Content-Type: application/json' -d'
{
  "type": "fs",
  "settings": {
    "compress": "true",
    "location": "/mnt/backup"
  }
}
'
  1. Verified if the repository has been created in the Production Environment

curl -k -u elastic:admin123 -X POST 'https://esnode1.localdomain:9200/_snapshot/my-app-backup/_verify?pretty'

  1. Verified if the repository has been created in the DR Environment

curl -k -u elastic:admin123 -X POST 'https://dresnode1.localdomain:9200/_snapshot/my-app-backup/_verify?pretty'

  1. Created a snapshot for the Production Environment

curl -k -u elastic:admin123 -X PUT 'https://esnode1.localdomain:9200/_snapshot/my-app-backup/snapshot-01032023?wait_for_completion=true&pretty'

  1. Verified if the snapshot has been created in the Production Environment

curl -k -u elastic:admin123 -X GET 'https://esnode1.localdomain:9200/_snapshot/my-app-backup/snapshot-01032023?pretty'

  1. Restore the snapshot of Production in the DR Environment

curl -k -u elastic:admin123 -X POST 'https://dresnode1.localdomain:9200/_snapshot/my-app-backup/snapshot-01032023/_restore?wait_for_completion=true&pretty'

Is /mnt/backup shared between both clusters?

Yes, /mnt/backup is mounted on each node of the cluster. I'm just simulating the Production and DR backup and restore using a virtual box.

Right but is the filesystem the same for both, not just the same mount but you can actually see the files the snapshot has created on the prod cluster in the same mount on the dr cluster?

You also need to set the dr cluster to register the repo as read only, as per the docs (and more specifically here).

Thanks @warkolm, I successfully restored my cluster.

Also, index .ds-ilm-history-5-2022.12.27-000001, .ds-.logs-deprecation.elasticsearch-default-2022.12.27-000001, and .security-7 has been created by elasticsearch after taking the snapshot of the Production. May I know if these are relevant indices that also need to be restored in the DR?

Only if you want the same Security setup.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.