5 Replies Latest reply on Oct 2, 2014 12:29 PM by billcjr

    Restore a user created view

    billcjr

      I was wondering if anyone could tell me how to restore a user created view? I have seen lots of answers on how to restore a default view, but this would not be a default. They created a custom view with custom queries to limit which devices were in each graph on the page but today they deleted a lot of the graphs they had configured accidentally. I am not sure if this may be something as simple as just restoring some XML files or if this info is all database stored. I am running Orion Platform 2013.1.0 and NPM 10.5.

        • Re: Restore a user created view
          stuartwhyte

          Hi,

           

          Views are stored in a number of database tables.  The actual layout of the view (columns widths, number of columns etc) are in the "views" table, each resource on the page is given an individual ResourceID, stored in the "Resources" table, and placed in a column and row position.  The settings for each resource ID are stored in the "ResourceProperties" table.

           

          Unfortunately when a resource is deleted it is non-recvoverable without a restore from a previous database backup.

           

          Stuart

            • Re: Restore a user created view
              billcjr

              Hi Stuart,

               

              That answer was great but I have only two other questions for clarification.

               

              1. Are those the only 3 tables that affect a view?

              2. I do not have a "Resource Settings" table, did you happen to type a different name by accident? I do have a plain "Settings" table.

               

              I plan on having my SQL team restore my database to another database so I can do a comparison of the tables and then try to restore only the view he deleted.

               

              Bill

                • Re: Restore a user created view
                  billcjr

                  I think I found the table you meant. I see that the table "ResourceProperties" has the filters that belongs to the tables. I know what I need to do from here. Thank you very much Stuart.

                    • Re: Restore a user created view
                      stuartwhyte

                      Hi Bill,

                       

                      Yes you're correct, I was listing the tables from memory.  The correct tables are:

                       

                      Views

                      Resources

                      ResourceProperties

                       

                      I have edited my original post.

                       

                      Good luck, let me know how you get on

                       

                      Stuart

                        • Re: Restore a user created view
                          billcjr

                          I got the information from the three tables today, but due to additional changes being made since the original delete I chose not to do a full restore of the tables. I just used the info provided to extract the basic information and then recreate the view for the user. But it still helped me out a great deal. Next time I will be able to fix it right away.

                           

                          Thank you for all your help with this Stuart.