forked from opensearch-project/opensearch-migrations
-
Notifications
You must be signed in to change notification settings - Fork 0
Adjusting settings during migration
Peter Nied edited this page Dec 20, 2024
·
3 revisions
During a migration there is an opportunity change names and paths of index and data structures that are not modifiable after they are declared. This page provides a cookbook of different scenarios and templates that can be used to make these adjustments.
Note
We recommend creating an alias to an index instead of renaming them, if an alias is created on the source cluster the migration process will copy the alias over as well. See create an alias documentation.
- Navigate to the bootstrap box and open the
cdk.context.json
with vim - Add/Update the key
reindexFromSnapshotExtraArgs
to include--transformer-config-file /shared-logs-output/rfs-transform.json
- Redeploy the Migration Assistant
- Navigate on to the Migration Assistant console
- Create a file with
vim /shared-logs-output/rfs-transform.json
- Add the following to the file:
[
{
"JsonConditionalTransformerProvider": [
{
"JsonJMESPathPredicateProvider": {
"script": "index._index == '{{INDEX_ORIGINAL_NAME}}"
}
},
[
{
"JsonJoltTransformerProvider": {
"script": {
"operation": "modify-overwrite-beta",
"spec": {
"index": {
"\\_index": "INDEX_NEW_NAME"
}
}
}
}
}
]
]
}
]
- Replace both
{{INDEX_ORIGINAL_NAME}}
and{{INDEX_NEW_NAME}}
- Create a file with
vim /shared-logs-output/metadata-transform.json
- Add the following to the file:
[
{
"JsonConditionalTransformerProvider": [
{
"JsonJMESPathPredicateProvider": {
"script": "name == '{{INDEX_ORIGINAL_NAME}}'"
}
},
[
{
"JsonJoltTransformerProvider": {
"script": {
"operation": "modify-overwrite-beta",
"spec": {
"name": "{{INDEX_NEW_NAME}}"
}
}
}
}
]
]
}
]
- Replace both
{{INDEX_ORIGINAL_NAME}}
and{{INDEX_NEW_NAME}}
- Run metadata migration with the additional parameter
console metadata migrate --transformer-config-file /shared-logs-output/metadata-transform.json
- Run backfill as normal
Encountering a compatibility issue or missing feature?
- Search existing issues to see if it’s already reported. If it is, feel free to upvote and comment.
- Can’t find it? Create a new issue to let us know.
- Migration Assistant Overview
- Is Migration Assistant Right for You?
- Existing Data Migration - Quick Start Guide
- A. Snapshot Creation Verification
- B. Client Traffic Switchover Verification
- C. Traffic Capture Verification
- D. System Reset Before Migration