Hello,
I'm trying to restore an index snapshot created on ES cluster v. 1.7.4 to an ES cluster running version 2.1.2. I was able to register a S3 repository (myRepo), and I can verify that the new cluster can access it.
However when running this command:
Restoring between the mentioned cluster versions should work.
Is there a way to work around this problem, like by providing the snapshot file name explicitly?
Thanks a lot,
That should work. Indeed, we switched from snapshot-* to snap-*.dat format in 2.0, but both formats should be supported for read operations. To help us diagnose the issue, could you post here the list of files in the base directory of S3 repository and the output of curl -XPOST "http://esCluster-2.1.2/_snapshot/myRepo/_all?
Related to this, could you also verify that you specified correct base_path and bucket in the repository settings. Was repository verification successful, when you registered it? When you try to restore and get the error back, do you see the corresponding error message in the log file on the master node? If you do, please post the entire error message with stack trace here.
{"error":{"root_cause":[{"type":"invalid_snapshot_name_exception","reason":"[myRepo:_all] Invalid snapshot name [all], must not start with ''"}],"type":"invalid_snapshot_name_exception","reason":"[myRepo:_all] Invalid snapshot name [all], must not start with ''"},"status":400}
I didn't have "base_path" field in the repository creation body, only "location" field. I modified the command to use base_path, then tried to restore the snapshot, but restore operation failed with the same error ("Blob object [snap-all_11_28_2016.dat] not found: The specified key does not exist.").
In both cases repository creation succeeded, I got this response from curl:
Hello,
I pasted log entries from master node log file below. I only copied the messages that seemed relevant to repository/restore issues.
Thanks a lot,
M
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshot(BlobStoreRepository.java:445)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:177)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:82)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:41)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:98)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$3.doRun(TransportMasterNodeAction.java:185)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.cloud.aws.blobstore.S3BlobContainer.openInput(S3BlobContainer.java:109)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.common.blobstore.support.AbstractLegacyBlobContainer.readBlob(AbstractLegacyBlobContainer.java:62)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.ChecksumBlobStoreFormat.readBlob(ChecksumBlobStoreFormat.java:93)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreFormat.read(BlobStoreFormat.java:83)
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshot(BlobStoreRepository.java:439)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshot(BlobStoreRepository.java:445)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:177)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:82)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:41)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:98)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$3.doRun(TransportMasterNodeAction.java:185)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.cloud.aws.blobstore.S3BlobContainer.openInput(S3BlobContainer.java:109)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.common.blobstore.support.AbstractLegacyBlobContainer.readBlob(AbstractLegacyBlobContainer.java:62)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.ChecksumBlobStoreFormat.readBlob(ChecksumBlobStoreFormat.java:93)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreFormat.read(BlobStoreFormat.java:83)
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshot(BlobStoreRepository.java:439)
It means that elasticsearch doesn't see any snapshots in the path that you specified. Unless you are using an entire bucket, you need to specify correct base_path and it had to be spelled correctly (i.e. with underscore base_path and not with dash base-path).
Hello,
It looks like that was the problem. Changing field name to "base_path" (underscore) helped. After running the GET command you provided I was able to see a lot of snapshot entries.
I was also able to start the restore operation.
Thank you for your help!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.