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

Using the Saga Export/Import tool

Our recommendation in any migration is to use the built-in tool, this is our official supported way:

  1. Go to the Tools section of Saga, in the upper right menu
  2. By default, the Export / Import section will open, click on Export and wait for it to finish
  3. By the end of the process a file (or several files depending on the size of your database)
  4. Go to the new environment and startup Saga
    1. 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

  5. Go to the Tools section of Saga, in the upper right menu

  6. Click import and load the export file from Saga, wait for it to finish
    1. 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)

  7. Refresh the browser and everything should be just as the original environment


In case the refresh didn't work, restart Saga Server one more time

No Server or User Interface access available (Using Elasticsearch Dump)

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

  1. Assuming you have NodeJS installed in your computer, install Elasticsearch Dump
  2. From this point you have 2 options to migrate, to file or index-to-index
    1. 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
    2. 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

  3. Then restart any Saga related product to ensure full loading of the new indices


Using the Engine (Database) migration option

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:

  1. For Elasticsearch that would be the Snapshot / Restore API
  2. For OpenSearch that would be Domains Snapshots