Last active
June 18, 2016 02:24
-
-
Save yodlegists/9823e6418cee1cc1f2b5440b3040d510 to your computer and use it in GitHub Desktop.
running restore process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def recover_snapshot(client, snapshot): | |
| payload = { | |
| "ignore_unavailable": True, | |
| "rename_pattern": "(.+)", | |
| "rename_replacement": "prod_$1", | |
| "include_aliases": False, | |
| "index_settings": { | |
| "index.number_of_replicas": 1 | |
| } | |
| } | |
| # This will hang until the restore process is complete | |
| params = {'request_timeout': 86400} | |
| return client.snapshot.restore(REPOSITORY, snapshot, payload, wait_for_completion=True, master_timeout="1d", params=params) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment