Skip to content

Instantly share code, notes, and snippets.

# To run this script make a directory called elasticsearch for your data.
# Note that this script won't work if your data is too big for local disk.
import pickle
from elasticsearch import Elasticsearch
### CHANGE THESE CONSTANTS TO MATCH THE ELASTICSEARCH CLUSTER YOU'RE MIGRATING FROM ###
ES_HOST = "example.elasticsearch.url.com"
ES_PORT = 9200
ES_INDEX = "my_index_name"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Dumps Elasticsearch index; handy for backing up Kibana."""
import sys
import argparse
import json
import logging
import requests