[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10008":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":14,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":15,"starSnapshotCount":15,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},10008,"elasticsearch-dump","elasticsearch-dump\u002Felasticsearch-dump","Import and export tools for elasticsearch & opensearch","",null,"JavaScript",7929,867,142,1,0,3,9,39.82,"Apache License 2.0",false,"master",true,[24,25,26,27,28,29,30,31],"backup","docker","elasticdump","elasticsearch","export","import","javascript","opensearch","2026-06-12 02:02:15","elasticdump\n==================\n\nTools for moving and saving indices from Elasticsearch and OpenSearch\n\n![picture](https:\u002F\u002Fraw.github.com\u002Felasticsearch-dump\u002Felasticsearch-dump\u002Fmaster\u002Felasticdump.jpg)\n\n---\n[![Build Status](https:\u002F\u002Fgithub.com\u002Felasticsearch-dump\u002Felasticsearch-dump\u002Factions\u002Fworkflows\u002Felasticdump.yaml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Felasticsearch-dump\u002Felasticsearch-dump)\n[![npm version](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002Felasticdump.svg)](https:\u002F\u002Fnpmjs.org\u002Fpackage\u002Felasticdump)\n[![NPM Weekly stats](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdw\u002Felasticdump.svg)](https:\u002F\u002Fnpmjs.org\u002Fpackage\u002Felasticdump)\n[![NPM Monthly stats](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Felasticdump.svg)](https:\u002F\u002Fnpmjs.org\u002Fpackage\u002Felasticdump)\n[![DockerHub Badge](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Felasticdump\u002Felasticsearch-dump.svg)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Felasticdump\u002Felasticsearch-dump\u002F)\n[![DockerHub Badge](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Ftaskrabbit\u002Felasticsearch-dump.svg)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Ftaskrabbit\u002Felasticsearch-dump\u002F)\n\n\n\n## Version Warnings!\n\n- Version `1.0.0` of Elasticdump changes the format of the files created by the dump.  Files created with version `0.x.x` of this tool are likely not to work with versions going forward.  To learn more about the breaking changes, vist the release notes for version [`1.0.0`](https:\u002F\u002Fgithub.com\u002Felasticsearch-dump\u002Felasticsearch-dump\u002Freleases\u002Ftag\u002Fv1.0.0).  If you recive an \"out of memory\" error, this is probably or most likely the cause.\n- Version `2.0.0` of Elasticdump removes the `bulk` options.  These options were buggy, and differ between versions of Elasticsearch.  If you need to export multiple indexes, look for the `multielasticdump` section of the tool.\n- Version `2.1.0` of Elasticdump moves from using `scan\u002Fscroll` (ES 1.x) to just `scroll` (ES 2.x).  This is a backwards-compatible change within Elasticsearch, but performance may suffer on Elasticsearch versions prior to 2.x.\n- Version `3.0.0` of Elasticdump has the default queries updated to only work for ElasticSearch version 5+.  The tool *may* be compatible with earlier versions of Elasticsearch, but our version detection method may not work for all ES cluster topologies\n- Version `5.0.0` of Elasticdump contains a breaking change for the s3 transport. _s3Bucket_ and _s3RecordKey_ params are no longer supported please use s3urls instead\n- Version `6.1.0` and higher of Elasticdump contains a change to the upload\u002Fdump process. This change allows for overlapping promise processing. The benefit of which is improved performance due increased parallel processing, but a side-effect exists where-by records (data-set) aren't processed in a sequential order (the ordering is no longer guaranteed)\n- Version `6.67.0` and higher of Elasticdump will quit if the node.js version does not match the minimum requirement needed (v10.0.0)\n- Version `6.76.0` and higher of Elasticdump added support for OpenSearch (forked from Elasticsearch 7.10.2)\n\n## Installing\n\n(local)\n```bash\nnpm install elasticdump\n.\u002Fbin\u002Felasticdump\n```\n\n(global)\n```bash\nnpm install elasticdump -g\nelasticdump\n```\n\n## Use\n\n### Standard Install\n\nElasticdump works by sending an `input` to an `output`. Both can be either an elasticsearch URL or a File.\n\nElasticsearch\u002FOpenSearch:\n- format:  `{protocol}:\u002F\u002F{host}:{port}\u002F{index}`\n- example: `http:\u002F\u002F127.0.0.1:9200\u002Fmy_index`\n\nFile:\n- format:  `{FilePath}`\n- example: `\u002FUsers\u002Fevantahler\u002FDesktop\u002Fdump.json`\n\nStdio:\n- format: stdin \u002F stdout\n- format: `$`\n\nYou can then do things like:\n\n```bash\n# Copy an index from production to staging with analyzer and mapping:\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=http:\u002F\u002Fstaging.es.com:9200\u002Fmy_index \\\n  --type=analyzer\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=http:\u002F\u002Fstaging.es.com:9200\u002Fmy_index \\\n  --type=mapping\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=http:\u002F\u002Fstaging.es.com:9200\u002Fmy_index \\\n  --type=data\n\n# Backup index data to a file:\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=\u002Fdata\u002Fmy_index_mapping.json \\\n  --type=mapping\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=\u002Fdata\u002Fmy_index.json \\\n  --type=data\n\n# Backup and index to a gzip using stdout:\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=$ \\\n  | gzip > \u002Fdata\u002Fmy_index.json.gz\n\n# Backup the results of a query to a file\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=query.json \\\n  --searchBody=\"{\\\"query\\\":{\\\"term\\\":{\\\"username\\\": \\\"admin\\\"}}}\"\n  \n# Specify searchBody from a file\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=query.json \\\n  --searchBody=@\u002Fdata\u002Fsearchbody.json  \n\n# Copy a single shard data:\nelasticdump \\\n  --input=http:\u002F\u002Fes.com:9200\u002Fapi \\\n  --output=http:\u002F\u002Fes.com:9200\u002Fapi2 \\\n  --input-params=\"{\\\"preference\\\":\\\"_shards:0\\\"}\"\n\n# Backup aliases to a file\nelasticdump \\\n  --input=http:\u002F\u002Fes.com:9200\u002Findex-name\u002Falias-filter \\\n  --output=alias.json \\\n  --type=alias\n\n# Import aliases into ES\nelasticdump \\\n  --input=.\u002Falias.json \\\n  --output=http:\u002F\u002Fes.com:9200 \\\n  --type=alias\n\n# Backup templates to a file\nelasticdump \\\n  --input=http:\u002F\u002Fes.com:9200\u002Ftemplate-filter \\\n  --output=templates.json \\\n  --type=template\n\n# Import templates into ES\nelasticdump \\\n  --input=.\u002Ftemplates.json \\\n  --output=http:\u002F\u002Fes.com:9200 \\\n  --type=template\n\n# Split files into multiple parts\nelasticdump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=\u002Fdata\u002Fmy_index.json \\\n  --fileSize=10mb\n\n# Import data from S3 into ES (using s3urls)\nelasticdump \\\n  --s3AccessKeyId \"${access_key_id}\" \\\n  --s3SecretAccessKey \"${access_key_secret}\" \\\n  --input \"s3:\u002F\u002F${bucket_name}\u002F${file_name}.json\" \\\n  --output=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index\n\n# Export ES data to S3 (using s3urls)\nelasticdump \\\n  --s3AccessKeyId \"${access_key_id}\" \\\n  --s3SecretAccessKey \"${access_key_secret}\" \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output \"s3:\u002F\u002F${bucket_name}\u002F${file_name}.json\"\n\n# Import data from MINIO (s3 compatible) into ES (using s3urls)\nelasticdump \\\n  --s3AccessKeyId \"${access_key_id}\" \\\n  --s3SecretAccessKey \"${access_key_secret}\" \\\n  --input \"s3:\u002F\u002F${bucket_name}\u002F${file_name}.json\" \\\n  --output=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index\n  --s3ForcePathStyle true\n  --s3Endpoint https:\u002F\u002Fproduction.minio.co\n\n# Export ES data to MINIO (s3 compatible) (using s3urls)\nelasticdump \\\n  --s3AccessKeyId \"${access_key_id}\" \\\n  --s3SecretAccessKey \"${access_key_secret}\" \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output \"s3:\u002F\u002F${bucket_name}\u002F${file_name}.json\"\n  --s3ForcePathStyle true\n  --s3Endpoint https:\u002F\u002Fproduction.minio.co\n\n# Import data from CSV file into ES (using csvurls)\nelasticdump \\\n  # csv:\u002F\u002F prefix must be included to allow parsing of csv files\n  # --input \"csv:\u002F\u002F${file_path}.csv\" \\\n  --input \"csv:\u002F\u002F\u002Fdata\u002Fcars.csv\"\n  --output=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --csvSkipRows 1    # used to skip parsed rows (this does not include the headers row)\n  --csvDelimiter \";\" # default csvDelimiter is ','\n```\n\n### Non-Standard Install\n\nIf Elasticsearch\u002FOpenSearch is not being served from the root directory the `--input-index` and\n`--output-index` are required. If they are not provided, the additional sub-directories will\nbe parsed for index and type.\n\nElasticsearch\u002FOpenSearch:\n- format:  `{protocol}:\u002F\u002F{host}:{port}\u002F{sub}\u002F{directory...}`\n- example: `http:\u002F\u002F127.0.0.1:9200\u002Fapi\u002Fsearch`\n\n```bash\n# Copy a single index from a elasticsearch:\nelasticdump \\\n  --input=http:\u002F\u002Fes.com:9200\u002Fapi\u002Fsearch \\\n  --input-index=my_index \\\n  --output=http:\u002F\u002Fes.com:9200\u002Fapi\u002Fsearch \\\n  --output-index=my_index \\\n  --type=mapping\n\n# Copy a single type:\nelasticdump \\\n  --input=http:\u002F\u002Fes.com:9200\u002Fapi\u002Fsearch \\\n  --input-index=my_index\u002Fmy_type \\\n  --output=http:\u002F\u002Fes.com:9200\u002Fapi\u002Fsearch \\\n  --output-index=my_index \\\n  --type=mapping\n\n```\n\n### Docker install\nIf you prefer using docker to use elasticdump, you can download this project from docker hub:\n```bash\ndocker pull elasticdump\u002Felasticsearch-dump\n```\nThen you can use it just by :\n- using `docker run --rm -ti elasticdump\u002Felasticsearch-dump`\n- you'll need to mount your file storage dir `-v \u003Cyour dumps dir>:\u003Cyour mount point>` to your docker container\n\nExample:\n```bash\n# Copy an index from production to staging with mappings:\ndocker run --rm -ti elasticdump\u002Felasticsearch-dump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=http:\u002F\u002Fstaging.es.com:9200\u002Fmy_index \\\n  --type=mapping\ndocker run --rm -ti elasticdump\u002Felasticsearch-dump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=http:\u002F\u002Fstaging.es.com:9200\u002Fmy_index \\\n  --type=data\n\n# Backup index data to a file:\ndocker run --rm -ti -v \u002Fdata:\u002Ftmp elasticdump\u002Felasticsearch-dump \\\n  --input=http:\u002F\u002Fproduction.es.com:9200\u002Fmy_index \\\n  --output=\u002Ftmp\u002Fmy_index_mapping.json \\\n  --type=data\n```\n\nIf you need to run using `localhost` as your ES host:\n```bash\ndocker run --net=host --rm -ti elasticdump\u002Felasticsearch-dump \\\n  --input=http:\u002F\u002Fstaging.es.com:9200\u002Fmy_index \\\n  --output=http:\u002F\u002Flocalhost:9200\u002Fmy_index \\\n  --type=data\n```\n\n## Dump Format\n\nThe file format generated by this tool is line-delimited JSON files.  The dump file itself is not valid JSON, but each line is.  We do this so that dumpfiles can be streamed and appended without worrying about whole-file parser integrity.\n\nFor example, if you wanted to parse every line, you could do:\n```\nwhile read LINE; do jsonlint-py \"${LINE}\" ; done \u003C dump.data.json\n```\n\n## Options\n\n```\nelasticdump: Import and export tools for elasticsearch\nversion: %%version%%\n\nUsage: elasticdump --input SOURCE --output DESTINATION [OPTIONS]\n\nCore options\n--------------------\n--input\n                    Source location (required)\n\n--input-index\n                    Source index and type\n                    (default: all, example: index\u002Ftype)\n\n--output\n                    Destination location (required)\n\n--output-index\n                    Destination index and type\n                    (default: all, example: index\u002Ftype)\n\n\nOptions\n--------------------\n--big-int-fields\n                    Specifies a comma-seperated list of fields that should be checked for big-int support\n                    (default '')\n\n--bulkAction\n                    Sets the operation type to be used when preparing the request body to be sent to elastic search.\n                    For more info - https:\u002F\u002Fwww.elastic.co\u002Fguide\u002Fen\u002Felasticsearch\u002Freference\u002Fcurrent\u002Fdocs-bulk.html\n                    (default: index, options: [index, update, delete, create)\n\n--ca, --input-ca, --output-ca\n                    CA certificate. Use --ca if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--cert, --input-cert, --output-cert\n                    Client certificate file. Use --cert if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--csvConfigs\n                    Set all fast-csv configurations\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--csvCustomHeaders  A comma-seperated listed of values that will be used as headers for your data. This param must\n                    be used in conjunction with `csvRenameHeaders`\n                    (default : null)\n\n--csvDelimiter\n                    The delimiter that will separate columns.\n                    (default : ',')\n\n--csvFirstRowAsHeaders\n                    If set to true the first row will be treated as the headers.\n                    (default : true)\n\n--csvHandleNestedData\n                    Set to true to handle nested JSON\u002FCSV data.\n                    NB : This is a very opinionated implementaton !\n                    (default : false)\n\n--csvIdColumn\n                    Name of the column to extract the record identifier (id) from\n                    When exporting to CSV this column can be used to override the default id (@id) column name\n                    (default : null)\n\n--csvIgnoreAutoColumns\n                    Set to true to prevent the following columns @id, @index, @type from being written to the output file\n                    (default : false)\n\n--csvIgnoreEmpty\n                    Set to true to ignore empty rows.\n                    (default : false)\n\n--csvIncludeEndRowDelimiter\n                    Set to true to include a row delimiter at the end of the csv\n                    (default : false)\n\n--csvIndexColumn\n                    Name of the column to extract the record index from\n                    When exporting to CSV this column can be used to override the default index (@index) column name\n                    (default : null)\n\n--csvLTrim\n                    Set to true to left trim all columns.\n                    (default : false)\n\n--csvMaxRows\n                    If number is > 0 then only the specified number of rows will be parsed.(e.g. 100 would return the first 100 rows of data)\n                    (default : 0)\n\n--csvRTrim\n                    Set to true to right trim all columns.\n                    (default : false)\n\n--csvRenameHeaders\n                    If you want the first line of the file to be removed and replaced by the one provided in the `csvCustomHeaders` option\n                    (default : true)\n\n--csvSkipLines\n                    If number is > 0 the specified number of lines will be skipped.\n                    (default : 0)\n\n--csvSkipRows\n                    If number is > 0 then the specified number of parsed rows will be skipped\n                    NB:  (If the first row is treated as headers, they aren't a part of the count)\n                    (default : 0)\n\n--csvTrim\n                    Set to true to trim all white space from columns.\n                    (default : false)\n\n--csvTypeColumn\n                    Name of the column to extract the record type from\n                    When exporting to CSV this column can be used to override the default type (@type) column name\n                    (default : null)\n\n--csvWriteHeaders   Determines if headers should be written to the csv file.\n                    (default : true)\n\n--customBackoff\n                    Activate custom customBackoff function. (s3)\n\n--debug\n                    Display the elasticsearch commands being used\n                    (default: false)\n\n--delete\n                    Delete documents one-by-one from the input as they are\n                    moved.  Will not delete the source index\n                    (default: false)\n\n--delete-with-routing\n                    Passes the routing query-param to the delete function\n                    used to route operations to a specific shard.\n                    (default: false)\n\n--esCompress\n                    if true, add an Accept-Encoding header to request compressed content encodings from the server (if not already present)\n                    and decode supported content encodings in the response.\n                    Note: Automatic decoding of the response content is performed on the body data returned through request\n                    (both through the request stream and passed to the callback function) but is not performed on the response stream\n                    (available from the response event) which is the unmodified http.IncomingMessage object which may contain compressed data.\n                    See example below.\n\n--fileSize\n                    supports file splitting.  This value must be a string supported by the **bytes** module.\n                    The following abbreviations must be used to signify size in terms of units\n                    b for bytes\n                    kb for kilobytes\n                    mb for megabytes\n                    gb for gigabytes\n                    tb for terabytes\n                    e.g. 10mb \u002F 1gb \u002F 1tb\n                    Partitioning helps to alleviate overflow\u002Fout of memory exceptions by efficiently segmenting files\n                    into smaller chunks that then can be merged if needs be.\n\n--filterSystemTemplates\n                    Whether to remove metrics-*-* and logs-*-* system templates\n                    (default: true])\n\n--force-os-version\n                    Forces the OpenSearch version used by elasticsearch-dump.\n                    (default: 7.10.2)\n\n--fsCompress\n                    gzip data before sending output to file.\n                    On import the command is used to inflate a gzipped file\n                    \n--compressionLevel\n                    The level of zlib compression to apply to responses.\n                    defaults to zlib.Z_DEFAULT_COMPRESSION\n\n--handleVersion\n                    Tells elastisearch transport to handle the `_version` field if present in the dataset\n                    (default : false)\n\n--headers\n                    Add custom headers to Elastisearch requests (helpful when\n                    your Elasticsearch instance sits behind a proxy)\n                    (default: '{\"User-Agent\": \"elasticdump\"}')\n                    Type\u002Fdirection based headers are supported .i.e. input-headers\u002Foutput-headers\n                    (these will only be added based on the current flow type input\u002Foutput)\n\n--help\n                    This page\n\n--ignore-errors\n                    Will continue the read\u002Fwrite loop on write error\n                    (default: false)\n\n--ignore-es-write-errors\n                    Will continue the read\u002Fwrite loop on a write error from elasticsearch\n                    (default: true)\n\n--inputSocksPort, --outputSocksPort\n                    Socks5 host port\n\n--inputSocksProxy, --outputSocksProxy\n                    Socks5 host address\n\n--inputTransport\n                    Provide a custom js file to use as the input transport\n\n--key, --input-key, --output-key\n                    Private key file. Use --key if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--limit\n                    How many objects to move in batch per operation\n                    limit is approximate for file streams\n                    (default: 100)\n\n--maxRows\n                    supports file splitting.  Files are split by the number of rows specified\n\n--maxSockets\n                    How many simultaneous HTTP requests can the process make?\n                    (default:\n                      5 [node \u003C= v0.10.x] \u002F\n                      Infinity [node >= v0.11.x] )\n\n--noRefresh\n                    Disable input index refresh.\n                    Positive:\n                      1. Much increased index speed\n                      2. Much less hardware requirements\n                    Negative:\n                      1. Recently added data may not be indexed\n                    Recommended using with big data indexing,\n                    where speed and system health is a higher priority\n                    than recently added data.\n\n--offset\n                    Integer containing the number of rows you wish to skip\n                    ahead from the input transport.  When importing a large\n                    index, things can go wrong, be it connectivity, crashes,\n                    someone forgets to `screen`, etc.  This allows you\n                    to start the dump again from the last known line written\n                    (as logged by the `offset` in the output).  Please be\n                    advised that since no sorting is specified when the\n                    dump is initially created, there's no real way to\n                    guarantee that the skipped rows have already been\n                    written\u002Fparsed.  This is more of an option for when\n                    you want to get as much data as possible in the index\n                    without concern for losing some rows in the process,\n                    similar to the `timeout` option.\n                    (default: 0)\n\n--outputTransport\n                    Provide a custom js file to use as the output transport\n\n--overwrite\n                    Overwrite output file if it exists\n                    (default: false)\n\n--params\n                    Add custom parameters to Elastisearch requests uri. Helpful when you for example\n                    want to use elasticsearch preference\n                    --input-params is a specific params extension that can be used when fetching data with the scroll api\n                    --output-params is a specific params extension that can be used when indexing data with the bulk index api\n                    NB : These were added to avoid param pollution problems which occur when an input param is used in an output source\n                    (default: null)\n\n--parseExtraFields\n                    Comma-separated list of meta-fields to be parsed\n\n--pass, --input-pass, --output-pass\n                    Pass phrase for the private key. Use --pass if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--quiet\n                    Suppress all messages except for errors\n                    (default: false)\n\n--retryAttempts\n                    Integer indicating the number of times a request should be automatically re-attempted before failing\n                    when a connection fails with one of the following errors `ECONNRESET`, `ENOTFOUND`, `ESOCKETTIMEDOUT`,\n                    ETIMEDOUT`, `ECONNREFUSED`, `EHOSTUNREACH`, `EPIPE`, `EAI_AGAIN`\n                    (default: 0)\n\n--retryDelay\n                    Integer indicating the back-off\u002Fbreak period between retry attempts (milliseconds)\n                    (default : 5000)\n\n--retryDelayBase\n                    The base number of milliseconds to use in the exponential backoff for operation retries. (s3)\n\n--scroll-with-post\n                    Use a HTTP POST method to perform scrolling instead of the default GET\n                    (default: false)\n\n--scrollId\n                    The last scroll Id returned from elasticsearch.\n                    This will allow dumps to be resumed used the last scroll Id &\n                    `scrollTime` has not expired.\n\n--scrollTime\n                    Time the nodes will hold the requested search in order.\n                    (default: 10m)\n\n--searchBody\n                    Preform a partial extract based on search results\n                    when ES is the input, default values are\n                      if ES > 5\n                        `'{\"query\": { \"match_all\": {} }, \"stored_fields\": [\"*\"], \"_source\": true }'`\n                      else\n                        `'{\"query\": { \"match_all\": {} }, \"fields\": [\"*\"], \"_source\": true }'`\n                    [As of 6.68.0] If the searchBody is preceded by a @ symbol, elasticdump will perform a file lookup\n                    in the location specified. NB: File must contain valid JSON\n\n--searchBodyTemplate\n                    A method\u002Ffunction which can be called to the searchBody\n                        doc.searchBody = { query: { match_all: {} }, stored_fields: [], _source: true };\n                    May be used multiple times.\n                    Additionally, searchBodyTemplate may be performed by a module. See [searchBody Template](#search-template) below.\n\n--searchWithTemplate\n                    Enable to use Search Template when using --searchBody\n                    If using Search Template then searchBody has to consist of \"id\" field and \"params\" objects\n                    If \"size\" field is defined within Search Template, it will be overridden by --size parameter\n                    See https:\u002F\u002Fwww.elastic.co\u002Fguide\u002Fen\u002Felasticsearch\u002Freference\u002Fcurrent\u002Fsearch-template.html for\n                    further information\n                    (default: false)\n\n--size\n                    How many objects to retrieve\n                    (default: -1 -> no limit)\n\n--skip-existing\n                    Skips resource_already_exists_exception when enabled and exit with success\n                    (default: false)\n\n--sourceOnly\n                    Output only the json contained within the document _source\n                    Normal: {\"_index\":\"\",\"_type\":\"\",\"_id\":\"\", \"_source\":{SOURCE}}\n                    sourceOnly: {SOURCE}\n                    (default: false)\n\n--support-big-int\n                    Support big integer numbers\n\n--templateRegex\n                    Regex used to filter templates before passing to the output transport\n                    (default: ((metrics|logs|\\..+)(-.+)?)\n\n--timeout\n                    Integer containing the number of milliseconds to wait for\n                    a request to respond before aborting the request. Passed\n                    directly to the request library. Mostly used when you don't\n                    care too much if you lose some data when importing\n                    but would rather have speed.\n\n--tlsAuth\n                    Enable TLS X509 client authentication\n\n--toLog\n                    When using a custom outputTransport, should log lines\n                    be appended to the output stream?\n                    (default: true, except for `$`)\n\n--transform\n                    A method\u002Ffunction which can be called to modify documents\n                    before writing to a destination. A global variable 'doc'\n                    is available.\n                    Example script for computing a new field 'f2' as doubled\n                    value of field 'f1':\n                        doc._source[\"f2\"] = doc._source.f1 * 2;\n                    May be used multiple times.\n                    Additionally, transform may be performed by a module. See [Module Transform](#module-transform) below.\n\n--type\n                    What are we exporting?\n                    (default: data, options: [index, settings, analyzer, data, mapping, policy, alias, template, component_template, index_template])\n\n--versionType\n                    Elasticsearch versioning types. Should be `internal`, `external`, `external_gte`, `force`.\n                    NB : Type validation is handled by the bulk endpoint and not by elasticsearch-dump\n\n--openSearchServerless\n                    Set to true to force elasticsearch-dump think the connected cluster is on AWS OpenSearch Serverless\n                    elasticsearch-dump will detect cluster flavor automatically. This flag isn't needed usually.\n                    (default : false)\n\n--searchAfter\n                    Set to true to use dump with Elasticsearch search_after. Requires ES version 7.17.0 or higher\n                    (default: false)\n\n--pit               \n                    Set to true to enabled PIT (Point in time support). Please READ the documentation for the requirements on how to use this\n                    (default : false)\n--pitKeepAlive      \n                    Set the keepAlive time for the pit\n                    (default : 5m)\n--heapSnapshot      \n                    Set to true to enable a snapshot to be taken. This is for debugging purposes ONLY ! requires node >12\n                    (default : false)\n\nAWS specific options\n--------------------\n--awsAccessKeyId and --awsSecretAccessKey\n                    When using Amazon Elasticsearch Service protected by\n                    AWS Identity and Access Management (IAM), provide\n                    your Access Key ID and Secret Access Key.\n                    --sessionToken can also be optionally provided if using temporary credentials\n\n--awsChain\n                    Use [standard](https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fsecurity\u002Fa-new-and-standardized-way-to-manage-credentials-in-the-aws-sdks\u002F)\n                    location and ordering for resolving credentials including environment variables,\n                    config files, EC2 and ECS metadata locations _Recommended option for use with AWS_\n\n--awsIniFileName\n                    Override the default aws ini file name when using --awsIniFileProfile\n                    Filename is relative to ~\u002F.aws\u002F\n                    (default: config)\n\n--awsIniFileProfile\n                    Alternative to --awsAccessKeyId and --awsSecretAccessKey,\n                    loads credentials from a specified profile in aws ini file.\n                    For greater flexibility, consider using --awsChain\n                    and setting AWS_PROFILE and AWS_CONFIG_FILE\n                    environment variables to override defaults if needed\n\n--awsRegion\n                    Sets the AWS region that the signature will be generated for\n                    (default: calculated from hostname or host)\n\n--awsService\n                    Sets the AWS service that the signature will be generated for\n                    (default: calculated from hostname or host)\n\n--awsUrlRegex\n                    Overrides the default regular expression that is used to validate AWS urls that should be signed\n                    (default: ^https?:\\\u002F\\\u002F.*\\.amazonaws\\.com.*$)\n\n--s3ACL\n                    S3 ACL: private | public-read | public-read-write | authenticated-read | aws-exec-read |\n                    bucket-owner-read | bucket-owner-full-control [default private]\n\n--s3AccessKeyId\n                    AWS access key ID\n\n--s3SessionToken\n                    AWS session token in case of using temporary credentials\n\n--s3Compress\n                    gzip data before sending to s3\n\n--s3Configs\n                    Set all s3 constructor configurations\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--s3Endpoint\n                    AWS endpoint that can be used for AWS compatible backends such as\n                    OpenStack Swift and OpenStack Ceph\n\n--s3ForcePathStyle\n                    Force path style URLs for S3 objects [default false]\n\n--s3Options\n                    Set all s3 parameters shown here https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSJavaScriptSDK\u002Flatest\u002FAWS\u002FS3.html#createMultipartUpload-property\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--s3Region\n                    AWS region\n\n--s3SSEKMSKeyId\n                    KMS Id to be used with aws:kms uploads\n\n--s3SSLEnabled\n                    Use SSL to connect to AWS [default true]\n\n--s3SecretAccessKey\n                    AWS secret access key\n\n--s3ServerSideEncryption\n                    Enables encrypted uploads\n\n--s3StorageClass\n                    Set the Storage Class used for s3\n                    (default: STANDARD)\n```\n\n## Elasticsearch's Scroll API\nElasticsearch provides a [scroll](https:\u002F\u002Fwww.elastic.co\u002Fguide\u002Fen\u002Felasticsearch\u002Freference\u002Fcurrent\u002Fsearch-request-scroll.html) API to fetch all documents of an index starting from (and keeping) a consistent snapshot in time, which we use under the hood.  This method is safe to use for large exports since it will maintain the result set in cache for the given period of time.\n\nNOTE: only works for `--output`\n\n## Bypassing self-sign certificate errors\n\nSet the environment `NODE_TLS_REJECT_UNAUTHORIZED=0` before running elasticdump\n\n```bash\n# An alternative method of passing environment variables before execution\n# NB : This only works with linux shells\nNODE_TLS_REJECT_UNAUTHORIZED=0 elasticdump --input=\"https:\u002F\u002Flocalhost:9200\" --output myfile\n```\n\n## MultiElasticDump\n\nThis package also ships with a second binary, `multielasticdump`.  This is a wrapper for the normal elasticdump binary, which provides a limited option set, but will run elasticdump in parallel across many indexes at once. It runs a process which forks into `n` (default your running host's # of CPUs) subprocesses running elasticdump.\n\nThe limited option set includes:\n\n- `parallel`:   `os.cpus()`,\n- `match`:      `'^.*$'`,\n- `matchType`:      `alias`,\n- `order`:      `'asc'`,\n- `input`:      `null`,\n- `output`:     `null`,\n- `scrollTime`: `'10m'`,\n- `timeout`: `null`,\n- `limit`:      `100`,\n- `offset`:     `0`,\n- `size`:       `-1`,\n- `direction`:   `dump`,\n- `ignoreType`:   ``\n- `includeType`:   ``\n- `prefix`:   `'''`\n- `suffix`:   `''`\n- `interval`:     `1000`\n- `searchBody`: `null`\n- `transform`: `null`\n- `support-big-int`: `false`\n- `big-int-fields`: ``\n- `ignoreChildError`: `false`\n\n\nIf the `--direction` is `dump`, which is the default, `--input` MUST be a URL for the base location of an ElasticSearch server (i.e. `http:\u002F\u002Flocalhost:9200`) and `--output` MUST be a directory. Each index that does match will have a data, mapping, and analyzer file created.\n\nFor loading files that you have dumped from multi-elasticsearch, `--direction` should be set to `load`, `--input` MUST be a directory of a multielasticsearch dump and `--output` MUST be a Elasticsearch server URL.\n\n`--parallel` is how many forks should be run simultaneously and `--match` is used to filter which indexes should be dumped\u002Floaded (regex).\n\n`--ignoreType` allows a type to be ignored from the dump\u002Fload. Six options are supported. `data,mapping,analyzer,alias,settings,template`. Multi-type support is available, when used each type must be comma(,)-separated\nand `interval` allows control over the interval for spawning a dump\u002Fload for a new index. For small indices this can be set to `0` to reduce delays and optimize performance\ni.e analyzer,alias types are ignored by default\n\n`--includeType` allows a type to be included in the dump\u002Fload. Six options are supported - `data,mapping,analyzer,alias,settings,template`. \n\n`--ignoreChildError` allows multi-elasticdump to continue if a child throws an error.\n\n`--matchType`  allows multi-elasticdump to fetch indices from the specified elasticsearch endpoint. Two options are supported - `alias,datastream`\n\n\nNew options, `--suffix` allows you to add a suffix to the index name being created e.g. `es6-${index}` and\n`--prefix` allows you to add a prefix to the index name e.g. `${index}-backup-2018-03-13`.\n`--order` accepts `asc` or `desc` and allows the indexes\u002Faliases to be sorted before processing is performed\n\n## Usage Examples\n\n```bash\n# backup ES indices & all their type to the es_backup folder\nmultielasticdump \\\n  --direction=dump \\\n  --match='^.*$' \\\n  --input=http:\u002F\u002Fproduction.es.com:9200 \\\n  --output=\u002Ftmp\u002Fes_backup\n\n# Only backup ES indices ending with a prefix of `-index` (match regex). \n# Only the indices data will be backed up. All other types are ignored.\n# NB: analyzer & alias types are ignored by default\nmultielasticdump \\\n  --direction=dump \\\n  --match='^.*-index$'\\\n  --input=http:\u002F\u002Fproduction.es.com:9200 \\\n  --ignoreType='mapping,settings,template' \\\n  --output=\u002Ftmp\u002Fes_backup\n```\n\n## Custom Matcher - MultiElasticDump\n\nThe default matcher for `multielasticdump` is regex based and won't handle complex conditions or business rules.\nSupport was added for defining custom matchers.\n\nWhen specifying the `customMatcher` option, prefix the value with `@` (a curl convention) to load matcher file\n\n\n ```bash\n multielasticdump \\\n  --direction=dump \\\n  --customMatcher='@.\u002FcustomMatcher\u002Fbackup.js'\\\n  --input=http:\u002F\u002Fproduction.es.com:9200 \\\n  --ignoreType='mapping,settings,template' \\\n  --output=\u002Ftmp\u002Fes_backup\n```\n\nThe only requirement for this module is that it must define a test function.\n\n```javascript\nmodule.exports = {\n  test: function (indexName) {\n    \u002F\u002F determine if the index should be loaded\u002Fdumped.\n    \u002F\u002F must return a boolen(true\u002Ffalse)\n  }\n};\n```\n\n\n## Module Transform\n\nWhen specifying the `transform` option, prefix the value with `@` (a curl convention) to load the top-level function which is called with the document and the parsed arguments to the module.\n\nUses a pseudo-URL format to specify arguments to the module as follows. Given:\n\n```bash\nelasticdump --transform='@.\u002Ftransforms\u002Fmy-transform?param1=value&param2=another-value'\n```\n\nwith a module at `.\u002Ftransforms\u002Fmy-transform.js` with the following:\n\n```javascript\nmodule.exports = function(doc, options) {\n  \u002F\u002F do something to doc\n};\n```\n\nwill load module `.\u002Ftransforms\u002Fmy-transform.js`, and execute the function with `doc` and `options` = `{\"param1\": \"value\", \"param2\": \"another-value\"}`.\n\nAn example transform for anonymizing data on-the-fly can be found in the `transforms` folder.\n\n## searchBody Template\n\nWhen specifying the `searchBodyTemplate` option, prefix the value with `@` (a curl convention) to load the top-level function which is called with the document and the parsed arguments to the module.\n\nUses a pseudo-URL format to specify arguments to the module as follows. Given:\n\n```bash\nelasticdump --searchBodyTemplate='@.\u002Ftemplates\u002Fmy-template?param1=value&param2=another-value'\n```\n\nwith a module at `.\u002Ftransforms\u002Fmy-transform.js` with the following:\n\n```javascript\nmodule.exports = function(doc, options) {\n  \u002F\u002F result must be added to doc.searchBody\n  doc.searchBody = {}\n};\n```\n\nwill load module `.\u002Ftemplates\u002Fmy-template.js', and execute the function with `doc` and `options` = `{\"param1\": \"value\", \"param2\": \"another-value\"}`.\n\nAn example template for modifying dates using a simple templating engine is available in the `templates` folder.\n\n## How Elasticdump handles Nested Data in CSV\n\nElasticdump is capable of reading\u002Fwriting nested data, but in an *_opinionated way*. This is to reduce complexity while parsing\u002Fsaving CSVs\nThe format flattens all nesting to a single level (an example of this is shown below)\n\n```json\n{\n   \"elasticdump\":{\n      \"version\":\"6.51.0\",\n      \"formats\":[\n         \"json\",\n         \"csv\"\n      ]\n   },\n   \"contributors\":[\n      {\n         \"name\":\"ferron\",\n         \"id\":3\n      }\n   ],\n   \"year\":112\n}\n```\n\n\n\nOutput format\n\n```json\n{\n  \"elasticdump\":\"{\\\"version\\\":\\\"6.51.0\\\",\\\"formats\\\":[\\\"json\\\",\\\"csv\\\"]}\",\n  \"contributors\":\"{\\\"contributors\\\":[{\\\"name\\\":\\\"ferron\\\",\\\"id\\\":3}]}\",\n  \"year\":2020\n}\n```\n\n**Notice that the data is flattened to 1 level**. Object keys are used for headers and values as row data.\nThis might not work with existing nested data formats, but that's the format that was chosen for `elasticdump`\nbecause of its simplicity. This detection is disabled by default, to enable use the `--csvHandleNestedData` flag\n\n\n## Notes\n\n- This tool is likely to require Elasticsearch version 1.0.0 or higher\n- Elasticdump (and Elasticsearch in general) will create indices if they don't exist upon import\n- When exporting from elasticsearch, you can export an entire index (`--input=\"http:\u002F\u002Flocalhost:9200\u002Findex\"`) or a type of object from that index (`--input=\"http:\u002F\u002Flocalhost:9200\u002Findex\u002Ftype\"`). This requires ElasticSearch 1.2.0 or higher\n- If the path to our elasticsearch installation is in a sub-directory, the index and type must be provided with a separate argument (`--input=\"http:\u002F\u002Flocalhost:9200\u002Fsub\u002Fdirectory --input-index=index\u002Ftype\"`).Using `--input-index=\u002F` will include all indices and types.\n- We can use the `put` method to write objects.  This means new objects will be created and old objects with the same ID be updated\n- The `file` transport will not overwrite any existing files by default, it will throw an exception if the file already exists. You can make use of `--overwrite` instead.\n- If you need basic http auth, you can use it like this: `--input=http:\u002F\u002Fname:password@production.es.com:9200\u002Fmy_index` or by setting the `ELASTICDUMP_INPUT_USERNAME` and `ELASTICDUMP_INPUT_PASSWORD` environment variables. For output URLs, `ELASTICDUMP_OUTPUT_USERNAME` and `ELASTICDUMP_OUTPUT_PASSWORD` may be used.\n- If you choose a stdio output (`--output=$`), you can also request a more human-readable output with `--format=human`\n- If you choose a stdio output (`--output=$`), all logging output will be suppressed\n- If you are using Elasticsearch version 6.0.0 or higher the `offset` parameter is no longer allowed in the scrollContext\n- ES 6.x.x & higher no longer support the `template` property for `_template`. All templates prior to ES 6.0 has to be upgraded to use `index_patterns`\n- ES 7.x.x & higher no longer supports `type` property. All templates prior to ES 6.0 has to be upgraded to remove the type property\n- ES 5.x.x ignores offset (from) parameter in the search body. All records will be returned\n- ES 6.x.x [from](https:\u002F\u002Fwww.elastic.co\u002Fguide\u002Fen\u002Felasticsearch\u002Freference\u002F6.8\u002Fbreaking-changes-6.0.html#_scroll) parameter can no longer be used in the search request body when initiating a scroll\n-  Index templates has been deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.\n- Ensure JSON in the searchBody properly escaped to avoid parsing issues : https:\u002F\u002Fwww.freeformatter.com\u002Fjson-escape.html\n- Dropped support for Node.JS 8 in Elasticdump v6.32.0. Node.JS 10+ is now required.\n- Elasticdump v6.42.0 added support for CSV import\u002Fexport using the [fast-csv](https:\u002F\u002Fc2fo.io\u002Ffast-csv\u002F) library \n- Elasticdump v6.68.0 added support for specifying a file containing the searchBody\n- Elasticdump v6.85.0 added support for ignoring auto columns in CSV\n- Elasticdump v6.86.0 added support for searchBodyTemplate which allows the searchBody to be transformed\n- Elasticdump v6.110.1 added support for AWS OpenSearch serverless collection. Note: by default, [AWS OpenSearch serverless does not support `\u002F_search?scroll` API and PUT `_bulk`](https:\u002F\u002Fdocs.aws.amazon.com\u002Fopensearch-service\u002Flatest\u002Fdeveloperguide\u002Fserverless-genref.html#serverless-operations). As a workaround, the dump is implemented using `_search` and POST `_bulk` API only. This may affect the performance of the dump. \n- Elasticdump v6.112.0 added support for setting gzip compression level\n- Elasticdump v6.115.0 added support for custom matchers\n- Elasticdump v6.117.0 added support for elasticsearch search_after and pit\n\n## Articles on Elasticdump\n- [A practical Guide to working with Elasticdump](https:\u002F\u002Fblog.logrocket.com\u002Fa-practical-guide-to-working-with-elasticdump\u002F)\n- [Moving Elasticsearch Indexes with Elasticdump](https:\u002F\u002Fapassionatechie.wordpress.com\u002F2019\u002F07\u002F03\u002Fmoving-elasticsearch-indexes-with-elasticdump\u002F)\n- [Guide to Elasticdump - Moving and Saving Elasticsearch Indices](https:\u002F\u002Fstackabuse.com\u002Fguide-to-elasticdump-moving-and-saving-elasticsearch-indices\u002F)\n- [Use elasticsearch-dump to migrate data](https:\u002F\u002Fwww.alibabacloud.com\u002Fhelp\u002Fen\u002Felasticsearch\u002Flatest\u002Felasticsearch-dump-use)\n\n\nInspired by https:\u002F\u002Fgithub.com\u002Fcrate\u002Felasticsearch-inout-plugin and https:\u002F\u002Fgithub.com\u002Fjprante\u002Felasticsearch-knapsack\n","elasticsearch-dump 是一个用于 Elasticsearch 和 OpenSearch 的导入导出工具。其核心功能包括数据的备份、迁移和恢复，支持多种存储格式，并且可以通过 Docker 容器轻松部署。该工具使用 JavaScript 编写，具有高度的灵活性和可扩展性，能够处理大规模的数据集。适用于需要定期备份 Elasticsearch 或 OpenSearch 数据、进行集群间数据迁移或在开发测试环境中快速搭建索引等场景。",2,"2026-06-11 03:26:06","top_topic"]