Saving from Docker Grafana to local

I am running Grafana in Docker with docker-compose and a docker volume called grafana-data.
My Dockerfile copies my local provisioning folder into the docker image to make it available to Grafana, so that I could have persistent base dashboards and datasources. This is pretty basic usage.

Now, I spin up my Grafana instance with docker-compose, add a data source and a dashboard. Is there a way to “save” those data sources and dashboards to my local provisioning folder?

I am aware that if I stop the container and start it again, my stuff will still be there, because of the docker volume, however, I want to be able to delete the volume AND the container and still have the same preloaded dashboards and datasources the next time I start everything, which would be there because of my provisioning files.

I’m confused because it seems like I have to manually write the local provisioning files and just trial and error to see if they work, but it feels like there should be a way to use the already-working datasources and dashboards to create the files.

@kevinlinxc You can export your dashboard to save it in the Provisioning folder. The data source is not that easy, we are creating data sources files based on examples and network output in the browser.