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 -v "$PWD":/opt kibana-backup-simple [options]
Note: if you use options like --all-spaces and --backup-file, you should mount some local directory into the container.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kibana-backup-simple-1.3.0.tar.gz.
File metadata
- Download URL: kibana-backup-simple-1.3.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd0fdc5986bdb8f2862174ef75c969525a1e07d51aeebd1e4c7971242f64a205
|
|
| MD5 |
ce6fc9a83c0755716209fac9a9cf3ce4
|
|
| BLAKE2b-256 |
d49047a345c2a7f828d97fd4f9e6691a1ce6578fe64d9a9981f07e5998bc8c1f
|
File details
Details for the file kibana_backup_simple-1.3.0-py3-none-any.whl.
File metadata
- Download URL: kibana_backup_simple-1.3.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
501c9fda1254f0d78f822a3373775458193268825123ca6974ab22df8cadb533
|
|
| MD5 |
56af5ed143ad141e3cf2262c42ea3b9a
|
|
| BLAKE2b-256 |
3c56dc058f600535fa70f22aa7c854dd9d7d8471a73418e908137f775b725ee2
|