12 Replies Latest reply on Oct 12, 2018 12:52 AM by Jarvis3310

    How to backup all data to sql server

    Jarvis3310

      How to backup data to sql server from pi server

      use api? and where can i get and how to use ?

      Thank you very much~~

        • Re: How to backup all data to sql server
          Lal_Babu_Shaik

          Hi Jarvis

           

          Could you please let us know the reason why you would like to backup data from PI server to SQL server? PI has its own backup subsystem which takes backup of the archive files which can be restored in case of any corruption.

           

          If you are looking for export of data then you can use PI integrator to export the data view to SQL server and SSIS package to export data from PI OLEDB to SQL server. To backup complete data i would recommend PI backup using pi backup subsystem and schedule task.

           

          KB01032 - PI Data Archive Backup Best Practices

           

          For AF you can take backup of SQL and restore whenever it is required.

           

          Thanks,

          Lal

          1 of 1 people found this helpful
          • Re: How to backup all data to sql server
            Rhys Kirk

            Backup data?

            If you need to know how to do it, I would suggest you need more knowledge of the PI System as a whole.

            Numerous ways to get data out but it wouldn't represent a true backup (as Lal points out).

             

            You need to explain a little more.

            1 of 1 people found this helpful
              • Re: How to backup all data to sql server
                Jarvis3310

                Hello Rhys Kirk,

                 

                First, thank you for your reply. I am engaged in the petrochemical industry manufacturing industry.  We have a lot of data. In addition to tens of thousands of tags, we also want to build a machine learning model for analysis.  Most importantly, online work is not affected when training model. The way we think of is to back up all data to another server and training model.

                 

                Thank you.

              • Re: How to backup all data to sql server
                John Messinger

                Backup implies a need to restore from that backup at some point in the future. SQL Server (or any other relational database) is not really a suitable target to backup PI data. Restoring data to PI from a SQL Server 'backup' would come with all sorts of issues and caveats. As has been previously mentioned, this wouldn't represent a true backup (especially not from a disaster recovery perspective).

                 

                As Rhys stated, you need to explain a little more what your intention is.

                3 of 3 people found this helpful
                • Re: How to backup all data to sql server
                  Roger Palmen

                  I'm involved in two projects to extract mass amounts of PI data for export to a cloud platform. There i relatively simply, pull data from PI using recordedvalues calls in the AFSDK in a C# application. Trick here is to query all events for a short period of time, such that filesystem caching is used optimal. Next challenge is to stream this data out, as the storage requirements easily mutliply 10-fold. So yes, it's doable.

                   

                  But,

                  Now i'm not an expert in platforms for machine learning, but i have my doubts if SQLserver is suitable for large amounts of data. The 10 years of data you need is not the real problem, i think the # of events and PI Points could be. So having any number of how many events we are talking about, makes all the difference in this discussion.

                  2 of 2 people found this helpful