Dump all elasticsearch (or opensearch) with one copy and paste

Using multielasticdump

# install node first https://andiradulescu.hashnode.dev/install-latest-node-with-one-copy-and-paste
# install multielasticdump
npm install elasticdump -g
SOURCE=https://user:password@IP:PORT # MUST be a URL for the base location of an ElasticSearch server (i.e. http://localhost:9200)
DESTINATION=./dump # MUST be a directory. Each index that does match will have a data, mapping, and analyzer file created
NODE_TLS_REJECT_UNAUTHORIZED=0 multielasticdump \
  --direction=dump \
  --match='^.*$' \
  --input=$SOURCE \
  --output=$DESTINATION

Mode details about multielasticdump parameters and commands:

elasticdump/multielasticdump