# Undeleting a resource

**URL:** <https://forum.inductiveautomation.com/t/undeleting-a-resource/33306>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [March 23, 2020, 6:48am UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306 "2020-03-23T06:48:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 23, 2020, 6:48am UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/1 "2020-03-23T06:48:32Z")

</div>

v7.9.13

Is there any way to un-delete something that’s gone out of the undo list?  
I accidentally, somehow, deleted a P&ID overview Window from a project… I didn’t realise until 2 hours later. I’ve actually had this happen a few times before but I’ve noticed it luckily straight afterwards. It’s pretty easy to do, and sometimes happens when you go to delete a component on the window and it deletes selects and deletes your Window instead… It does require a certain sequence of keys though which I can’t recall. Really annoying…

Maybe instead of an unassuming popup, it could be more alarming? At the very least, it could use a different word than “nodes” as this is very easy to skim over thinking it’s not important  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a18b507e414c47edd0994beb13ca426f54c281a5.png)

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [March 23, 2020, 8:54am UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/2 "2020-03-23T08:54:32Z")

</div>

Even if you have no backups configured, Ignition normally makes internal backups of the SQLite db that can be used (load it to a new installation, and copy the window over).

And if that doesn’t work, it’s also still in the active SQLite DB normally, it’s just deleted by setting a boolean flag, but the window is quite hard to find in the data structure, and it’s very likely that you will corrupt the project. So perhaps better ask Ignition support to assist, and be ready to try it again on a new installation.

But please don’t make that popup more difficult. No matter how difficult it is, people will always make mistakes. The only help is being able to undo mistakes.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 23, 2020, 9:43am UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/3 "2020-03-23T09:43:17Z")

</div>

I forgot about the auto config.idb backup. Looks like it’s only the last 5 changes? In any case i’m 3.5 hours too late ☹ Thanks for future though!  
Also I did find the resource mentioned in the PROJECT\_RESOURCES table in the config.idb. The Deleted field isn’t marked as true… maybe i’ll restart the gateway, as I don’t actually remember deleting it?  
Edit: no luck with restart… it’s mentioned as being deleted in the project change history

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [March 23, 2020, 10:14am UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/4 "2020-03-23T10:14:45Z")

</div>

If you found the deleted resource, perhaps create a new window, and copy the BLOB data from the deleted window you found to the new window.

Do watch out though, actions like these can easily corrupt any system. Make sure you have backups to return to.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 23, 2020, 12:19pm UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/5 "2020-03-23T12:19:21Z")

</div>

Did you try the rollback feature?  
It’s under the file menu in Designer.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 23, 2020, 8:27pm UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/6 "2020-03-23T20:27:48Z")

</div>

> [@MMaynard](#):
>
> Did you try the rollback feature?

Wow, I forgot about that as well. I haven't had to use any rollback in years! Just had a look and again, I'm too late 😅 but hopefully i'll remember in the next few years when it happens again, cheers

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 23, 2020, 8:57pm UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/7 "2020-03-23T20:57:16Z")

</div>

> [@Sanderd17](#):
>
> f you found the deleted resource, perhaps create a new window, and copy the BLOB data from the deleted window you found to the new window.

Holy crap, it worked! Thanks Sander, legend, and @MMaynard for reminding me of rollback. Also thanks IA for actually still keeping it in there!

A few tricks:

1. Create a new Window in Designer. A different name to the original helps to find the original in the table
2. Open sqllite editor with administrator privileges (run as administrator)
3. Table is called PROJECT\_RESOURCES  
a) Find your resource within the table  
b) Copy the DATA field value for the latest LASTEDIT  
c) Paste it into the DATA field in the row for your Window with the latest LASTEDIT value and note value
4. Back in the Designer, use the Rollback feature to rollback to the LASTEDIT version above. Voila

---

<div class="post-metadata">

**Author:** ![matthew.roberts](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@matthew.roberts](https://forum.inductiveautomation.com/u/matthew.roberts)\
**Post date:** [July 23, 2020, 11:39pm UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/8 "2020-07-23T23:39:24Z")

</div>

Hi. Where do I find this feature? There is no rollback under the file manager in V8

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 23, 2020, 11:41pm UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/9 "2020-07-23T23:41:12Z")

</div>

I think I remember seeing that this feature is no longer a part of 8 and that it might be making it back in later versions, but probably in a different format (e.g. git)

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [August 3, 2020, 12:49pm UTC](https://forum.inductiveautomation.com/t/undeleting-a-resource/33306/10 "2020-08-03T12:49:55Z")

</div>

V8 stores resources directly on the disk, and indeed makes no backups when overriding a resource.

The default revert feature has never been useful for me, and it has always made the databases and backups way bigger than they needed to be. Being able to see the previous version of a modified resource inside the database has been useful for me, but was a very risky action. So the removal of those internal resource backups was a good move to me.

Now the responsibilities are clear and simple: you are responsible for the backup and restore procedure, but you can use any tool you like (version control, rsync, …) as everything is accessible as files.
