Undeleting a resource

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

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.

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 :frowning: 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

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.

1 Like

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

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 :sweat_smile: but hopefully i’ll remember in the next few years when it happens again, cheers

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
3 Likes

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

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)

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.

2 Likes