Jllin

grafana dashboard备份与恢复
参考资料https://blog.dictvm.org/export-all-grafana-graphs/ ht...
扫描右侧二维码阅读全文
14
2018/10

grafana dashboard备份与恢复

参考资料

https://blog.dictvm.org/export-all-grafana-graphs/
https://github.com/m110/grafcli#usage
https://gist.github.com/jaimegago/11229750
https://utkarshcmu.github.io/wizzy-site/home/

安装grafcli

pip3 install grafcli

配置文件

cat /etc/grafcli/grafcli.conf

[grafcli]
editor = vim
mergetool = vimdiff
history = ~/.grafcli_history
verbose = off
force = on
colorize = on

[resources]
data-dir = ~/.grafcli

[hosts]
localhost = on

[localhost]
type = api
url = http://127.0.0.1:3000/api
user = admin
password = passwd

进入grafcli命令窗口 

# grafcli
[/]> ls remote
localhost
[/]> backup remote/localhost ./backup20180713.tgz  #备份
[/]> restore /grafanaback/backup20180713.tgz remote/localhost  #恢复是restore 
[/]> exit 
# ll
 -rw-------. 1 root root 22190 Jul 13 16:16 backup20180713.tgz

Last modification:October 14th, 2018 at 10:46 am
If you think my article is useful to you, please feel free to appreciate

Leave a Comment