Reputation: 5739
Usecase:
I have created es-indexes: mywebsiteindex-yyyymmdd , mysharepointindex-yyyymmdd in my laptop/dev machine. I want to export/zip that index as a file. The file may be migrated by someone who has credentials to target machine. And the zip/file may be imported to target-elastic folder.
You can abstract the words 'machine' 'folder' 'zip' in the above. Focus is 'transfer index as a file and reimport at target which I may not have access through http/tcp/ftp/ssh'.
Is there any python/other script out there that can export-from-source and import-to-target? A script that hides internal complexities of node/cluster count differences between dev/prod etc, and just move index.
Note: I already referred to the below page, so no need to reiterate the same
https://www.elastic.co/guide/en/cloud/current/ec-migrate-data.html
Upvotes: 2
Views: 1282
Reputation: 357
While I don't have a script for it, I have migrated a variety of indices by using the built-in snapshot APIs. The trick is that you want to look at the REST API documentation rather than at the cloud-focused documentation.
More specifically: you can create a snapshot repository with a type of "fs" to use local filesystem storage, then export a snapshot of the index you care about to that repository. Once you do so, it is safe to "bundle up" the whole thing and send it to another machine for restoration (the target Elastic instance will also need a repository defined, so that it has a path where it can look for the snapshot information). Don't forget to set the configuration option that controls where repositories are located, of course.
Upvotes: 0
Reputation: 7473
There are some options:
But you can't move your data files, this is not supported nor recommended by Elastic.
Upvotes: 1