Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wubin1989/esdump
esdump is a migration CLI written in Go for migrating index mapping and data from one elasticsearch to another.
https://github.com/wubin1989/esdump
cli cobra elasticsearch golang migration-tool
Last synced: 25 days ago
JSON representation
esdump is a migration CLI written in Go for migrating index mapping and data from one elasticsearch to another.
- Host: GitHub
- URL: https://github.com/wubin1989/esdump
- Owner: wubin1989
- License: mit
- Created: 2022-04-07T02:22:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-14T10:00:30.000Z (over 2 years ago)
- Last Synced: 2024-09-29T05:05:52.414Z (about 1 month ago)
- Topics: cli, cobra, elasticsearch, golang, migration-tool
- Language: Go
- Homepage:
- Size: 76.2 KB
- Stars: 11
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esdump
[![asciicast](https://asciinema.org/a/qudEF0BjfdFMHrvWOgEWblTGV.svg)](https://asciinema.org/a/qudEF0BjfdFMHrvWOgEWblTGV)
## 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 | Actively maintained. |
|6.x | 1.x | Actively maintained. |
|5.x | 1.x | Actively maintained. |## Install
- If go version < 1.17,
```shell
go get -v github.com/wubin1989/esdump/[email protected]
```- If go version >= 1.17,
```shell
go install -v github.com/wubin1989/esdump/[email protected]
```## Usage
```shell
➜ ~ esdump -h
migrate index from one elasticsearch to anotherUsage:
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
```shell
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