Need to download the dashboard config files

Need to download the dashboard config files all at once using shell script or is there any plugin to download or in grafana server is there any location to take backup of all dashboard config files.

Hi,

look at the following code. You may find it useful

@jiriwetter can’t we download in GUI or do we have any particular location in grafana server CLI?

Manually it is also possible. But if you have multiple dashboards it seems inefficient to me.

You can export each dashboard from the Dashboard settings menu on the right and then the JSON Model - you can copy and save it. Another option is to export from the sharing symbol on the top left and switch to the Export tab in the dialog.

@jiriwetter i have multiple dashboards with folders and subfolders . i can’t download all config files individually . do we have any option/path in server side . or do you have any script for this .

Hi @ravitejachandika,

Please check this post as there already seems to be an answer.

I hope this helps.

If you prefer a shell script approach without using a plugin, you can utilize the Grafana API to retrieve all dashboard configuration files. The API endpoint you need to use is /api/search?type=dash-db. You can make an HTTP request to this endpoint and iterate over the response to download each dashboard’s JSON configuration file individually. Regards

1 Like