In the case you need to move from one environment to another, or just give the environment to a coworker, this steps will help you to achieve that
Our recommendation in any migration is to use the built-in tool, this is our official supported way:
When Saga Server startups for the first time, it will create all the necessary indices and their respective mapping, for a clean import, you can delete all indices and restart Saga Server
Go to the Tools section of Saga, in the upper right menu
If multiple files were created, the order in which these must be uploaded is at the end of the file name, for example saga_20220921104431_1.sg and saga_20220921104431_2.sgm in this case start with one (_1), then upload the two (_2)
Refresh the browser and everything should be just as the original environment
As September 21st 2022, Works with OpenSearch too
There are cases where Saga Server is not required or wanted, there is no access to the user interface, or there are other restrictions not allowing the use of the migration tool, for these cases we recommend the use of the Third-party tool Elasticsearch Dump
Backing up to a File - (In case you don't have a direct access to the new Elasticsearch, or just want to backup the indices)
elasticdump --input=http://localhost:9200/index_name --output=index_name_analyzer.json --type=analyzer
elasticdump --input=http://localhost:9200/index_name --output=index_name_mapping.json --type=mapping
elasticdump --input=http://localhost:9200/index_name --output=index_name_data.json --type=data
If you are able to startup Saga Server in the new environment, exporting the mapping and the analyzer, is not necessary, just start the Saga Server, before you do the import of the Elasticsearch Dump
Restoring from File
elasticdump --input=index_name_analyzer.json --output=http://localhost:9200/index_name --type=analyzer
elasticdump --input=index_name_mapping.json --output=http://localhost:9200/index_name--type=mapping
elasticdump --input=index_name_data.json --output=http://localhost:9200/index_name--type=data
Index-to-Index (In case direct access is available)
elasticdump --input=http://localhost:9200/index_name --output=http://otherserver:9200/index_name --type=analyzer
elasticdump --input=http://localhost:9200/index_name --output=http://otherserver:9200/index_name --type=mapping
elasticdump --input=http://localhost:9200/index_name --output=http://otherserver:9200/index_name --type=data
If you are able to startup Saga Server in the new environment, exporting the mapping and the analyzer, is not necessary, just start the Saga Server, before you do the import of the Elasticsearch Dump
If all other options failed (you got a bigger issue than this), you can always use the recommended way of doing backups for you Search Engine: