GithubHelp home page GithubHelp logo

leakix / estk Goto Github PK

View Code? Open in Web Editor NEW
69.0 69.0 19.0 26 KB

ES ToolKit is a standalone solution to navigate and backup data for a wide range of Elasticsearch and Kibana versions.

License: MIT License

Go 100.00%
backup elasticsearch

estk's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

estk's Issues

Resume

Is there any way to resume a large download? Say from a specific document number?

Error in output

Hi i am getting this error can you please help newly learning this tool not very good with commands and there is no clear instructions.

image

Whether to support query conditional filtering?

Can you support conditional filtering like elasticdump's --searchBody?

--searchBody='
{
"query": {
"range": {
"activity.S_T_VD_EVENTOCCURDATE.raw": {
"gte": "2021-11-18",
"lt": "2021-11-19"
}
}
}
}'

Error in /lib/dump.go file, I fixed it here.

error
`estk-win64.exe dump --url=https://xx.xx.xx.xx --index=local-8.0.1-23.03 -o local-8.0.1-23.03.json
2023/03/09 05:24:35 Detecting version...
2023/03/09 05:24:35 Trying elasticsearch
2023/03/09 05:24:35 Found elasticsearch, major version 8
2023/03/09 05:24:35 Dump starting...
2023/03/09 05:24:35 Endpoint : https://xx.xx.xx.xx
2023/03/09 05:24:35 Index : local-8.0.1-23.03
2023/03/09 05:24:35 Output file : local_local-8.0.1-23.03.json
2023/03/09 05:24:35 Got scrollId :
panic: interface conversion: interface {} is nil, not map[string]interface {} [recovered]
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 1 [running]:
github.com/alecthomas/kong.catch(0xc000127ee8)
github.com/alecthomas/[email protected]/kong.go:366 +0xa5
panic({0xd46360, 0xc0001af890})
runtime/panic.go:838 +0x207
github.com/LeakIX/estk/lib.(*DumpCommand).Run(0x105c200, 0xc000074ba0)
github.com/LeakIX/estk/lib/dump.go:56 +0xa38
reflect.Value.call({0xd3bac0?, 0x105c200?, 0x18?}, {0xd8beb4, 0x4}, {0xc000004b88, 0x1, 0x0?})
reflect/value.go:556 +0x845
reflect.Value.Call({0xd3bac0?, 0x105c200?, 0xd2c8e0?}, {0xc000004b88, 0x1, 0x1})
reflect/value.go:339 +0xbf
github.com/alecthomas/kong.callMethod({0xd8ba45, 0x3}, {0xd6e740?, 0x105c200?, 0x3?}, {0xd3bac0?, 0x105c200?, 0xb8de8a?}, 0xc000006020?)
github.com/alecthomas/[email protected]/callbacks.go:71 +0x4e7
github.com/alecthomas/kong.(*Context).RunNode(0xc00012e600, 0xc00001d930, {0xc000127f60, 0x1, 0x1})
github.com/alecthomas/[email protected]/context.go:610 +0x5f7
github.com/alecthomas/kong.(*Context).Run(0xc000074ba0?, {0xc000127f60?, 0x0?, 0xa26679?})
github.com/alecthomas/[email protected]/context.go:627 +0xb8
main.main()
github.com/LeakIX/estk/main.go:35 +0x17a`

Fix was very simple
add

change in /lin/dump.go

import "strings"

and

Line 17

type DumpCommand struct {
Index []string required help:"Index filter" short:"i"

Line 45-51

if cmd.ScrollId == "" {
	indexFilter := ""
	if len(cmd.Index) > 0 {
		indexFilter = "/" + url.PathEscape(strings.Join(cmd.Index, ",")) + "/"
	} else {
		indexFilter = "/"
	}

This will fix the issue

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.