esdump

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 1 Imported by: 0

README

esdump

GoDoc Go codecov Go Report Card Release


asciicast

Introduction

esdump is a migration CLI written in Go for migrating index mapping and data from one elasticsearch to another.

Compatibility

Elasticsearch version Esdump version Remarks
7.x 2.x Coming soon.
6.x 1.x Actively maintained.
5.x 1.x Actively maintained.

Install

  • If go version < 1.17,
go get -v github.com/wubin1989/esdump@v1.0.0
  • If go version >= 1.17,
go install -v github.com/wubin1989/esdump@v1.0.0

Usage

➜  ~ esdump -h
migrate index from one elasticsearch to another

Usage:
  esdump [flags]

Flags:
  -d, --date string       date field of docs
      --desc              ascending or descending order by the date type field specified by date flag
  -e, --end string        end date, use time.Local as time zone, you may need to set TZ environment variable ahead
      --excludes string   excludes fields, multiple fields are separated by comma
  -h, --help              help for esdump
      --includes string   includes fields, multiple fields are separated by comma
  -i, --input string      source elasticsearch connection url
  -l, --limit int         limit for one scroll, it takes effect on the dumping speed (default 1000)
  -o, --output string     target elasticsearch connection url
  -s, --start string      start date, use time.Local as time zone, you may need to set TZ environment variable ahead
      --step duration     step duration (default 24h0m0s)
  -t, --type string       migration type, such as "mapping", "data", empty means both
  -v, --version           version for esdump
  -z, --zone string       time zone of the date type field specified by date flag (default "UTC")

Example

export TZ=Asia/Shanghai && esdump --input=http://localhost:9200/test --output=http://localhost:9200/test_dump --date=pubAt --start=2019-01-01 --zone=UTC --step=72h --excludes=html

License

MIT

Documentation

Overview

Copyright © 2021 wubin1989 <328454505@qq.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL