All Projects → grafana-tools → grafana-backup

grafana-tools / grafana-backup

Licence: GPL-3.0 license
[ON HOLD] CLI tool for backup/restore Grafana dashboards and datasources.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to grafana-backup

grafana
Grafana dashboard for Veeam solutions
Stars: ✭ 31 (+10.71%)
Mutual labels:  backup, grafana
Elephant Shed
PostgreSQL Management Appliance
Stars: ✭ 146 (+421.43%)
Mutual labels:  backup, grafana
Grafcli
Grafana CLI for quick and easy dashboards management.
Stars: ✭ 152 (+442.86%)
Mutual labels:  backup, grafana
PrometheusWithGrafana
Setup Prometheus with Grafana dashboard using Ansible
Stars: ✭ 50 (+78.57%)
Mutual labels:  grafana
enviroplus exporter
Prometheus exporter for enviroplus module by Pimoroni
Stars: ✭ 70 (+150%)
Mutual labels:  grafana
jira-backup-py
python script to create, download and upload to s3 your Jira or Confluence cloud instance backup
Stars: ✭ 36 (+28.57%)
Mutual labels:  backup
mindav
A self-hosted file backup server which bridges WebDAV protocol with @minio written in @totoval. Webdav ❤️ Minio
Stars: ✭ 64 (+128.57%)
Mutual labels:  backup
docker grafana statsd elk
Docker repo for a general purpose graphing and logging container - includes graphite+carbon, grafana, statsd, elasticsearch, kibana, nginx, logstash indexer (currently using redis as an intermediary)
Stars: ✭ 19 (-32.14%)
Mutual labels:  grafana
dedupsqlfs
Deduplicating filesystem via Python3, FUSE and SQLite
Stars: ✭ 24 (-14.29%)
Mutual labels:  backup
goodrexport
Goodreads data export
Stars: ✭ 16 (-42.86%)
Mutual labels:  backup
jmx-monitoring-stacks
No description or website provided.
Stars: ✭ 170 (+507.14%)
Mutual labels:  grafana
trello-full-backup
Python script to backup everything from Trello: boards, lists, cards and attachments
Stars: ✭ 119 (+325%)
Mutual labels:  backup
extract-xiso
Xbox ISO Creation/Extraction utility. Imported from SourceForge.
Stars: ✭ 358 (+1178.57%)
Mutual labels:  backup
k8s-all-in-one
Create a All-in-one Kubernetes Cluster.
Stars: ✭ 35 (+25%)
Mutual labels:  grafana
Frost
A backup program that does deduplication, compression, encryption
Stars: ✭ 25 (-10.71%)
Mutual labels:  backup
gitana
Gitana is a lightweight dashboard sync
Stars: ✭ 61 (+117.86%)
Mutual labels:  grafana
Elasticsearch
App Metrics Extensions for Elasticsearch reporting
Stars: ✭ 18 (-35.71%)
Mutual labels:  grafana
underbase
MongoDB schema and data migration library based on semver
Stars: ✭ 19 (-32.14%)
Mutual labels:  backup
ansible-backup
Ansible daily backup role
Stars: ✭ 25 (-10.71%)
Mutual labels:  backup
mlapp
ML model serving app based on APIs
Stars: ✭ 70 (+150%)
Mutual labels:  grafana

Backup tool for Gafana

CLI for the simple backup/restore operations of Grafana dashboards and datasources. It uses Grafana client SDK.

Work in progress. Current state: it may works, may not. Depends on build. Don't use it yet!

Examples

Back up all dashboards and any datasources which they require. Backups will be saved as separate files in the directory $CWD/backup

$ grafana-backup -url http://127.1:3000 -key xxxxxxxx backup

Show all dashboards which have the flags "tagone" and "tagtwo" applied and any datasources they use.

$ grafana-backup -tag tagone,tagtwo ls
<31> "Test Dashboard 1" [tagone tagtwo] 
<10> "prometheus-test" (prometheus) http://prometheus-test.example.com:9090
<8> "Promt2Local" (prometheus) http://prometheus-poc.example.com:9090

Show the dashboard titled "Test Dashboard 3" and the datasources it uses.

$ grafana-backup -title 'Test Dashboard 3' ls
<33> "Test Dashboard 3" [] 
<10> "prometheus-test" (prometheus) http://prometheus-test.example.com:9090
<8> "Promt2Local" (prometheus) http://prometheus-poc.example.com:9090

Back up all dashboards which have the flags "tag1" and "tag2" applied and any datasources they use.

$ grafana-backup -url http://127.1:3000 -key xxxxxxxx -tag tag1,tag2 backup

Back up a dashboard called "sample"

$ grafana-backup -url http://127.1:3000 -key xxxxxxxx -tag tag1,tag2 -title sample backup

Back up all dashboards, datasources and users

$ grafana-backup -url http://127.1:3000 -key xxxxxxxx -apply-for all

Show information about local backup files

$ grafana-backup ls-files
test-dashboard-1.db.json:	 board id:31 "Test Dashboard 1" [tagone tagtwo]
test-dashboard-2.db.json:	 board id:32 "Test Dashboard 2"
test-dashboard-3.db.json:	 board id:33 "Test Dashboard 3"

Restore all local objects which have the tag "tag1" applied to them.

$ grafana-backup -url http://127.1:3000 -key xxxxxxxx -tag tag1 restore

View the usage

$ grafana-backup 
Backup tool for Grafana.
Copyright (C) 2016-2017  Alexander I.Grafov <[email protected]>

This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under conditions of GNU GPL license v3.

Usage: $ grafana-backup [flags] <command>

Available commands are: backup, restore, ls, ls-files, info, config, help.
Call 'grafana-backup help <command>' for details about the command.

  -apply-for string
    	apply operation only for some kind of objects, available values are "auto", "all", "dashboards", "datasources", "users" (default "auto")
  -dir string
    	A directory to write backup files to or read them from. (default "backup")
  -force
    	force overwrite of existing objects
  -key string
    	API key of Grafana server
  -starred
    	only match starred dashboards
  -tag string
    	dashboard should match all these tags
  -timeout duration
    	read flagTimeout for interacting with Grafana in seconds (default 6m0s)
  -title string
    	dashboard title should match name
  -url string
    	URL of Grafana server
  -verbose
    	verbose output

List of proposed commands, flags and args

Draft and it is subject for changes.

# List dashboards.
$ grafana-backup -key=xxxx -url=x.y.z -title=match-name -tag=x,y,z ls

# List datasources.
$ grafana-backup -key=xxxx -url=x.y.z ls-ds

# List users.
$ grafana-backup -key=xxxx -url=x.y.z ls-users

# Do backup for matching dashboards.
$ grafana-backup -key=xxxx -url=x.y.z -title=match-name -tag=x,y,z backup path/to

# Restore objects on a server at url only for boards match tags.
$ grafana-backup -key=xxxx -url=x.y.z -tag x,y,z restore path/from

# List local backups for tags and file mask
$ grafana-backup -tag x,y,z -file "backup/*/*" ls-files 

# Save all flags to config var.
$ grafana-backup -key=xxxx -url=x.y.z config-set confname

# Get flag values for config variable.
$ grafana-backup config-get confname

# Flag applied for backup/restore
-objects=auto,dashboards,datasources,users,all
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].