I am taking snapshots using curator through GCS bucket and trying to restore it . But, I am getting error as below:
2020-10-13 06:08:35,293 INFO Preparing Action ID: 1, "restore"
2020-10-13 06:08:35,293 INFO Creating client object and testing connection
2020-10-13 06:08:35,297 INFO Instantiating client object
2020-10-13 06:08:35,297 INFO Testing client connectivity
2020-10-13 06:08:35,306 INFO Successfully created Elasticsearch client object with provided settings
2020-10-13 06:08:35,308 INFO Trying Action ID: 1, "restore": taking snapshots
2020-10-13 06:08:38,111 INFO Restoring indices "['.kibana_task_manager_1', 'elastic-curator', 'instagram', 'google', 'whatsapp', '.kibana_1', '.security-7', 'facebook', '.apm-agent-configuration']" from snapshot: curator-20201013060714
2020-10-13 06:08:39,122 ERROR Failed to complete action: restore. <class 'curator.exceptions.FailedExecution'>: Exception encountered. Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: TransportError(500, 'snapshot_restore_exception', '[curator-restrore:curator-20201013060714/oqCiYeddRAe923rE6vTHVg] cannot restore index [whatsapp] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name')
Please help me , if have done wrong while configuring. Every time, I have to close the system indices through API s. Then only restore is working fine. How to avoid that. Even though I am using replacement fields in the config file, they are not working. please suggest me with correct curator config
Please anybody reply to this question soon. Thanks in advance.
Actually, I want to do a scheduled restore .I can able to restore only one time. For the second job, it was throwing error as below:
2020-10-13 06:08:39,122 ERROR Failed to complete action: restore. <class 'curator.exceptions.FailedExecution'>: Exception encountered. Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: TransportError(500, 'snapshot_restore_exception', '[curator-restrore:curator-20201013060714/oqCiYeddRAe923rE6vTHVg] cannot restore index [whatsapp] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name')
Thanks for replying back. I want this for Diasater recovery. I am using curator to take snapshot from active cluster and restore snapshot to passive cluster. I am able to do scheduled backups using cron job. But not able to do scheduled restores to passive cluster. Only one job is running successful. From the 2nd time, it is throwing error as above. Please suggest me how can I achieve that.
OK, so you have a central snapshot repository and are writing to it from one cluster and reading from another. When you restore a snapshot you restore the full state so indices you restore can not already exist. To make this work you would therefore probably need to delete the indices from the destination cluster before restoring. Am not sure if curator can do that. This would always restore all data unlike when you take a snapshot and only altered segments are copied.
I have not seen it used this way, but that does not necessarily mean it is not possible. As you need to delete indices before restoring and you probably do not want to re-restore all indices it may be beyond what Curator can handle out of the box and you may need to script this yourself. Others with more Curator experience may have other ideas though.
I have done backup of 13.2 tb data using curator and trying to restore the entire data to another cluster using curator. I am closing the all indices before restoring the data . Even though I am getting error as below:
<class 'curator.exceptions.FailedExecution'>: Exception encountered. Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: TransportError(500, 'snapshot_restore_exception', '[diaster:curator-20201023000010/ln0mqdlgStmXa-H_s9Innw] cannot restore index [filebeat-2020.10.19] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name')
I am able to get rid of this error when I scheduled the restore job to every one hour. Did any one has any idea. Please help me on this..I also saw some indices are missing while restoring...
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.