-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[feature request]copy_index api(reindex with file copy not doc insert) #44128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging @elastic/es-distributed |
@riverbuilding just to understand this feature request better: Your motivation is to effectively have ES be the repository instead of using another repository implementation to save the complexity of setting up a repository? |
As far as I understand, this could be the index split functionality with the additional option of keeping the number of primary shards the same in the target index. |
@ywelsch split is really what I need in this situation. thanks a lot. |
@ywelsch I'd like to ask: when split index, can the "can't select recover from shards if both indices have the same number of shards" be omit? I mean, can the target index be set the same shard number with the original index? |
Right now, it can't. If we were to allow this, I would rather prefer to expose it via a new endpoint |
Pinging @elastic/es-core-features |
@ywelsch _clone is really a good name. thanks |
We discussed this today and think this a good enhancement and also like the |
Adds an API to clone an index. This is similar to the index split and shrink APIs, just with the difference that the number of primary shards is kept the same. In case where the filesystem provides hard-linking capabilities, this is a very cheap operation. Indexing cloning can be done by running `POST my_source_index/_clone/my_target_index` and it supports the same options as the split and shrink APIs. Closes #44128
Adds an API to clone an index. This is similar to the index split and shrink APIs, just with the difference that the number of primary shards is kept the same. In case where the filesystem provides hard-linking capabilities, this is a very cheap operation. Indexing cloning can be done by running `POST my_source_index/_clone/my_target_index` and it supports the same options as the split and shrink APIs. Closes #44128
use case: copy old index as a backup to support rollback and then update the original index to move forward in the same cluster.
ES provide re-index API which can be used to copy index with many flexibility like schema change, doc filter etc.
although with many limitations, from performance side, the file copy method is much fast than reindex, especially when index size is big.
API:
POST _copyindex
{
"source": {
"index": "twitter"
},
"dest": {
"index": "new_twitter"
"replica": Number//must eq or less than orginal index replica, otherwise, fail request
}
}
it's really like snapshot-restore process only repository is ES itself
The text was updated successfully, but these errors were encountered: