Restoring Snapshot to another cluster

I have two v7.12.0 elastic clusters. I want to snapshot data from one and restore to another.

Both clusters have

  • the same "type": "fs" snapshot repository
  • configured with the same "settings.location" and
  • the snapshot data exists in the same absolute path on both VMs
  • with the same file permissions.
  • The elasticsearch.yml file has the same path.repo property value on both clusters.

I've created a snapshot on Cluster 1 and copied the data over to Cluster 2.

When a list snapshots on Cluster 1, there is my snapshot that I created in that repo.
When I do the same on Cluster 2, no snapshots are listed.

Cluster 1 config

cluster:
  name: "cluster-livemetrics"

path:
  repo: ["/es-data-1/backups"]

/_snapshot/_all:

{
    "disk": {
        "type": "fs",
        "uuid": "Vex_allFTXK4uXkTXqzQDA",
        "settings": {
            "location": "/es-data-1/backups/"
        }
    }
}

/_snapshot/disk/_all:

{
    "snapshots": [
        {
            "snapshot": "2019-09-15",
            "uuid": "gPMQ8PBEQeCXPxz3nI6aKg",
            "version_id": 7120099,
            "version": "7.12.0",
 ...
}

Cluster 2 config

cluster:
  name: "cluster-metrics"

path:
  repo: ["/es-data-1/backups"]

/_snapshot/_all:

{
    "disk": {
        "type": "fs",
        "settings": {
            "location": "/es-data-1/backups/"
        }
    }
}

/_snapshot/disk/_all:

{
    "snapshots": []
}

Questions:

  1. Why does the repo have a UUID on Cluster 1 (cluster-livemetrics), but not Cluster 2 (cluster-metrics)?
  2. Why isn't my snapshot appearing on Cluster 2?

Thanks for any help!

You're effectively trying to do a repository backup but not following the steps properly:

When restoring a repository from a backup, you must not register the repository with Elasticsearch until the repository contents are fully restored. If you alter the contents of a repository while it is registered with Elasticsearch then the repository may become unreadable or may silently lose some of its contents.

Don't modify the repository contents while it's registered with Elasticsearch. Unregister it, copy the files, then register it again.

1 Like

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