Wednesday, December 11, 2019

Sven Mollinga

Sven Mollinga

This is my personal tech blog. This is the place where I put up updates about my current projects.

Backup/Restore/Migration tool for Elasticsearch. This tool will help to create compressed Elasticsearch backups and restores.

Git repo:
Programming Language: Python
Operating system: Debian/Ubuntu

How to install

apt-get install nodejs
npm install elasticdump -g
ln -s /usr/bin/nodejs /usr/bin/node
git clone
cd esbackup
cp /usr/local/bin/esbackup

How does it work?

usage: esbackup [-h] [--backup] [--restore] [--migrate] [-u SOURCE] [-d PATH]

Elasticsearch Backup/Restore script.

optional arguments:
-h, –help show this help message and exit
–backup …
–restore …
–migrate …
-u SOURCE Source Elasticsearch URL
-d PATH Backup Data Directory
-i IMPORT Import Data Directory
-t TARGET Target Elasticsearch URL


# Backup elasticsearch data
esbackup --backup -u -d /home/backupuser/esbackup

# Restore elasticsearch data from folder
esbackup --restore -t -d /home/backupuser/esbackup/2017-10-21_11-07

#Migrate from elaticsearch cluster to another cluster
esbackup --migrate -u -t


This tool is based on elasticdump. Credits to the builders of elasticdump.