{"id":6101,"date":"2018-07-12T10:45:56","date_gmt":"2018-07-12T14:45:56","guid":{"rendered":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/?p=6101"},"modified":"2025-04-04T10:02:54","modified_gmt":"2025-04-04T14:02:54","slug":"backup-and-restore-chronograf-dashboards","status":"publish","type":"post","link":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2018\/07\/backup-and-restore-chronograf-dashboards\/","title":{"rendered":"Backup and Restore Chronograf Dashboards"},"content":{"rendered":"<p><a href=\"https:\/\/www.influxdata.com\/time-series-platform\/chronograf\/\">Chronograf<\/a> is a web-based GUI for visualizing time-series data, typically from a time-series database such as <a href=\"https:\/\/www.influxdata.com\/time-series-platform\/influxdb\/\">InfluxDB<\/a>. I have been using it recently to store load-test measurements created by the <a href=\"http:\/\/ide4selenium.com\/\">MuseIDE<\/a> Measurements extension.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6097\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2018\/06\/step-metric-charts.png\" alt=\"\" width=\"600\" height=\"372\" \/><\/p>\n<p>I have been running it in the cloud, starting up a fresh instance whenever I have the need for storing load test results. This is handy and very cost-effective, but starting from scratch means that I need to set up dashboards of the metrics I want to see every time.<!--more--><\/p>\n<p>Looking for a solution, I found a <a href=\"https:\/\/www.influxdata.com\/blog\/chronograf-dashboard-definitions\/\">post on the InfluxData blog<\/a> that describes an API that can be used to backup and restore dashboards. But using\u00a0<em>curl<\/em> from the command line is a bit inefficient. So I pulled together some code to do it from a friendlier CLI that allows backing up and restoring just one specific dashboard or all of them at once.<\/p>\n<p>To backup all dashboards, now I can simply:<\/p>\n<pre>chronograf-dashboard backup http:\/\/myhostname.net\/chronograf<\/pre>\n<p>and it produces a <em>dashboards.json<\/em> file containing the dashboards. Next time I want to restore those dashboards, I can simply:<\/p>\n<pre>chronograf-dashboard restore http:\/\/myhostname.net\/chronograf<\/pre>\n<p>Adding a <em>-id 3<\/em> parameter allows me to backup one specific dashboard, using the dashboards id (which is the last part of the dashboards URL). That dashboard file can then be restored independently.<\/p>\n<p>Pre-built distribution, full instructions and the <a href=\"https:\/\/github.com\/ChrisLMerrill\/ChronografDashboard\">source code is on GitHub<\/a> &#8211; pass it along! Download the distribution from the <a href=\"https:\/\/github.com\/ChrisLMerrill\/ChronografDashboard\/releases\">releases<\/a> tab.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/www.influxdata.com\/time-series-platform\/chronograf\/\">Chronograf<\/a> is a web-based GUI for visualizing time-series data, typically from a time-series database such as <a href=\"https:\/\/www.influxdata.com\/time-series-platform\/influxdb\/\">InfluxDB<\/a>. I have been using it recently to store load-test measurements created by the <a href=\"http:\/\/ide4selenium.com\/\">MuseIDE<\/a> Measurements extension.<\/p>\n<p>I have been running it in the cloud, starting up a fresh instance whenever I have the need for storing load test results. This is handy and very cost-effective, but starting from scratch means that I need to set up dashboards of the metrics I want to see every time.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[309],"class_list":["post-6101","post","type-post","status-publish","format-standard","hentry","category-load-testing","tag-chronograf"],"_links":{"self":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/6101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/comments?post=6101"}],"version-history":[{"count":6,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/6101\/revisions"}],"predecessor-version":[{"id":6239,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/6101\/revisions\/6239"}],"wp:attachment":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/media?parent=6101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/categories?post=6101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/tags?post=6101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}