# Second imported dashboard overwrites the first imported dashboard with different data sources

**URL:** <https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177>\
**Category:** Grafana\
**Created:** [May 2, 2018, 2:38pm UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177 "2018-05-02T14:38:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinci](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vinci](https://community.grafana.com/u/vinci)\
**Post date:** [May 2, 2018, 2:38pm UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177/1 "2018-05-02T14:38:48Z")

</div>

Hi,  
I’m trying to use the same type of dashboard for different grafana sources. To do that, I simply import the json code and choose the data source that I’m interested in. The problem is that if the second time I import a dashboard for a different data source, it simply overwrite the dashboard which was initially imported and then I end up only with one dashboard. Any ideas how I can get past this and have as many similar dashboard as I want?  
Thanks

---

<div class="post-metadata">

**Author:** ![lgram](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/lgram/32/2599_2.png) [@lgram](https://community.grafana.com/u/lgram)\
**Post date:** [May 3, 2018, 7:45am UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177/2 "2018-05-03T07:45:31Z")

</div>

Hi,

This part of the documentation should help explain the situation: [http://docs.grafana.org/http\_api/dashboard/#create-update-dashboard](http://docs.grafana.org/http_api/dashboard/#create-update-dashboard)

If the uid is configured in the dashboard json you are trying to import that would lead to the dashboard being overwritten. Also, there can only be one dashboard with the same title in a folder so you would have to change one of them to be able to import the dashboard as a new dashboard.

Good luck.

---

<div class="post-metadata">

**Author:** ![vinci](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vinci](https://community.grafana.com/u/vinci)\
**Post date:** [May 3, 2018, 5:13pm UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177/3 "2018-05-03T17:13:47Z")

</div>

I don’t understand. Am I supposed to do it using the http api and running it from the cli? Can’t I do it using the GUI? I’m really a very cli-oriented type of guy, I really like to type, but for something as basic as copying dashboards and simply using different database sources (yes, was “clever” enough to use different names for the dashboards) I’d have expected a way to do it through the GUI directly.  
I _don’t_ have this section in the json i’m trying to import:  
“dashboard”: {  
“id”: null,  
“uid”: null,  
“title”: “Production Overview”,  
“tags”: [“templated”],  
“timezone”: “browser”,  
“schemaVersion”: 16,  
“version”: 0  
So I’d have expected grafana to deal with IDs by itself instead of overwriting them…

---

<div class="post-metadata">

**Author:** ![lgram](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/lgram/32/2599_2.png) [@lgram](https://community.grafana.com/u/lgram)\
**Post date:** [May 4, 2018, 7:29am UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177/4 "2018-05-04T07:29:25Z")

</div>

Is there a uid field in your json and does it have a value (if so, replace it with null)? You should be able to import the dashboard json through the gui but if the uid is set it will use it to find an existing dashboard and overwrite it. It’s a feature to make it possible to update a dashboard.

---

<div class="post-metadata">

**Author:** ![vinci](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vinci](https://community.grafana.com/u/vinci)\
**Post date:** [May 4, 2018, 3:05pm UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177/5 "2018-05-04T15:05:58Z")

</div>

Indeed, it did work after changing the UID. I thought the UID needed to be part of the dashboard block, but it appeared only at the end of the file together with timezone, title and version.  
Thanks!

---

<div class="post-metadata">

**Author:** ![lgram](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/lgram/32/2599_2.png) [@lgram](https://community.grafana.com/u/lgram)\
**Post date:** [May 5, 2018, 7:29am UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177/6 "2018-05-05T07:29:26Z")

</div>

Glad to hear we got it sorted 🙂

---

<div class="post-metadata">

**Author:** ![komal](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/komal/32/198_2.png) [@komal](https://community.grafana.com/u/komal)\
**Post date:** [February 15, 2019, 6:36pm UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177/7 "2019-02-15T18:36:17Z")

</div>

I wouldn’t tell this as a solution, but yes a good workaround. As an end user, I would expect if I export the dashboard and then import with different name, It would keep both dashboard. I consider this a bug.

---

<div class="post-metadata">

**Author:** ![vinci](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vinci](https://community.grafana.com/u/vinci)\
**Post date:** [February 15, 2019, 6:51pm UTC](https://community.grafana.com/t/second-imported-dashboard-overwrites-the-first-imported-dashboard-with-different-data-sources/7177/8 "2019-02-15T18:51:46Z")

</div>

I actually agree. It is completely non-intuitive, even for a specialist. There’s no reason why this shouldn’t be easier. I wonder if anything changed in Grafana 6.
