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
Backup/restore default namespace
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]
Backup non-default namespace
kibana-backup.py backup [--kibana-url KIBANA_URL] [--user USER] [--password PASSWORD] --space-id=myspace --backup-file=myspace.ndjson
Backup/restore all namespaces
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
, ...
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-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06aad9e4f67604920cb04e41ce4a02f97962e41f409c4fa0f86188f4a11d12bc |
|
MD5 | b542a4d83ded4c513d4e9068c062e73b |
|
BLAKE2b-256 | 0a41c4366078021672a07067ea7f22e1946a49b924a2479bf45b26b51629148c |
Hashes for kibana_backup_simple-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 430de295cd0e5ac9a18238c4c3679c1f0041d001914a8bec3f4f2245351cbe85 |
|
MD5 | 6add5f9eaa6e8ac7e81cabb1cc9fe61e |
|
BLAKE2b-256 | 471a49435354d6c45a1427e4853ae015d4361c826978ba1d597df638b153dd7b |