Simple backup/restore for Kibana saved objects: config, index patterns, dashboards, saved searches, etc.
Project description
Simple backup for Kibana saved objects: config, index patterns, dashboards, saved searches, etc.
Uses python3 and awesome python-requests library.
Usage
kibana-backup.py backup [--kibana-url KIBANA_URL] [--user USER] [--password PASSWORD] > backup.ndjson
cat backup.ndjson | kibana-backup.py restore [--kibana-url KIBANA_URL] [--user USER] [--password PASSWORD]
kibana-backup.py backup [--kibana-url KIBANA_URL] [--user USER] [--password PASSWORD] --space-id=myspace --backup-file=myspace.ndjson
kibana-backup.py backup [--kibana-url KIBANA_URL] [--user USER] [--password PASSWORD] --all-spaces --backup-file-prefix=backup-
# result: backup-default.ndjson backup-myspace.ndjson backup-myspace2.ndjson
kibana-backup.py restore [--kibana-url KIBANA_URL] [--user USER] [--password PASSWORD] --all-spaces --backup-file-prefix=backup-
# restores backup-default.ndjson to space id=default, backup-myspace.ndjson to space id=myspace, ...
backup
create backup file in newline-delimitered json formatrestore
restore backup from stdin--kibana-url
base URL to access Kibana API, default:http://127.0.0.1:5601
--user
Kibana user--password
Kibana password--space-id
Kibana space id. If not set then the default space is used.--all-spaces
Backup all spaces to separate files. Backup file name is used as prefix:<backup file>-<space-id>.ndjson
Installation
From pypi.org:
pip install kibana-backup-simple
Local installation:
git clone https://github.com/selivan/kibana-backup-simple.git
cd kibana-backup-simple
python setup.py install
Or just create a Docker image and use it:
docker build -t kibana-backup-simple .
docker run -it --rm kibana-backup-simple [options]
Documentation
- https://www.elastic.co/guide/en/kibana/current/saved-objects-api-export.html
- https://www.elastic.co/guide/en/kibana/current/saved-objects-api-import.html
- https://www.elastic.co/guide/en/kibana/current/spaces-api-get-all.html
License
P.S. If this code is useful for you - don't forget to put a star on it's github repo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kibana-backup-simple-0.99.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2065a432ee551c78dc80ae8a612e76cf278e496e17c69c837cd1d95230f265dd |
|
MD5 | 35a56f032733de5e34d211378924e9c1 |
|
BLAKE2b-256 | e79459f80557237b536c19f610a10bc0e86f28b3f3786c9616a3707f156e0c79 |
Hashes for kibana_backup_simple-0.99.12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53e4f46336dba2bda28e3ea2ccf99549573541dbe8cfbb0d7839b460f6000ae3 |
|
MD5 | c0788d0ab8c19ee44fa55a2a1e037251 |
|
BLAKE2b-256 | 4c149144ad7cbcc508149c8ede1f7b67fa7e1ff173e7e424296121bd65ec624c |