# Recover tag data history

**URL:** <https://forum.inductiveautomation.com/t/recover-tag-data-history/31268>\
**Category:** Ignition\
**Created:** [January 13, 2020, 10:23pm UTC](https://forum.inductiveautomation.com/t/recover-tag-data-history/31268 "2020-01-13T22:23:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.eichler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/john.eichler/32/24632_2.png) [@john.eichler](https://forum.inductiveautomation.com/u/john.eichler)\
**Post date:** [January 13, 2020, 10:23pm UTC](https://forum.inductiveautomation.com/t/recover-tag-data-history/31268/1 "2020-01-13T22:23:12Z")

</div>

Hi All

I recently moved a historical tag to a new folder in ignition. I am now regretting it as I cannot view any tag history prior to the change.

Looking at the SQL database, I can see that the tagid 33 was retired and a new tagid of 36 was created in table sqlth\_te.

Looking at the data tables I can still query and find heaps of data for the old tagid 33. Please can someone explain how to recover this data? Is it as simple as UPDATE [dbname], SET tagid = 36 WHERE tagid = 33?

Thanks.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5f39eb29401dc8d98fd4fcbb56c9666531207fd1.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5003bdb6919a91572de3653557d0eeddb49c0469.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/322a52cc731e0bcda8105840865b794e0d66f459.png)

---

<div class="post-metadata">

**Author:** ![john.eichler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/john.eichler/32/24632_2.png) [@john.eichler](https://forum.inductiveautomation.com/u/john.eichler)\
**Post date:** [January 13, 2020, 11:33pm UTC](https://forum.inductiveautomation.com/t/recover-tag-data-history/31268/2 "2020-01-13T23:33:47Z")

</div>

[Change tag name/path, keep history](http://forum.inductiveautomation.com/t/change-tag-name-path-keep-history/16323).

in sqlth\_te table, I changed the path of the old tag to reflect the new path. I also changed the retired timestamp to (NULL). At this point, I could see all my old data. However, ignition was not logging new data.

I then used the gateway command utlity gwcmd.bat -r to restart the gateway.

All is now working.

I hope this helps someone!
