<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html class="client-nojs" dir="ltr" lang="en"> <head> <meta charset="UTF-8" /> <title>Documents/How to/Transferring project configuration - OpenSCADAWiki</title> <meta content="MediaWiki 1.26.4" name="generator" /> <link href="https://www.gnu.org/copyleft/fdl.html" rel="copyright" /> <link href="files/doc.css" rel="stylesheet" /></head> <body><div class="floatright"><a href="index.html"><img alt="OpenSCADA" src="../en/files/index.png" /></a></div><div id="mw_header"> <div class="mw-indicators"> </div> <h1 id="firstHeading" lang="en">Documents/How to/Transferring project configuration</h1> </div><div class="mw-content-ltr" dir="ltr" id="mw-content-text" lang="en"><div class="mw-pt-languages" dir="ltr" lang="en"><div class="mw-pt-languages-list autonym"><span class="mw-pt-languages-ui mw-pt-languages-selected mw-pt-progress mw-pt-progress--complete">English</span> • ‎<a class="mw-pt-progress mw-pt-progress--complete" href="../ru/How_to_Transferring_project_configuration.html" title="ДокументациÑ/Как/ПеренеÑти конфигурации проекта OpenSCADA (100% translated)">mRussian</a> • ‎<a class="mw-pt-progress mw-pt-progress--complete" href="../uk/How_to_Transferring_project_configuration.html" title="ДокументаціÑ/Як/ПеренеÑти конфігурації проєкту OpenSCADA (100% translated)">УкраїнÑька</a></div></div> <div style="float:right; border:1px solid gray; width:300px; padding:2px; margin-left: 10pt; margin-bottom: 10pt;"> <ul><li> <b>Author:</b> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a></li></ul> </div> <p>The task of transferring configuration from one OpenSCADA project to another is often in demand. Moreover, most often it is necessary to carry out a partial transfer, for example, the transfer of individual developments that may be required in new project. </p><p>It should be noted that any developments with the slightest hint, and the prospect of re-use should be unified and stored in the separate-own library storages-DB. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="files/At.png" width="22" /></a> It is very not recommended to change the default configurations and elements of the standard libraries, and save your own-new libraries and elements in the storages of standard libraries. This will subsequently allow you to unhindered update the standard libraries, as well as simply use the developments of your previous projects. </p> <div class="toc" id="toc"><div id="toctitle"><h2>Contents</h2></div> <ul> <li class="toclevel-1 tocsection-1"><a href="#Simple_transferring_of_the_storage_with_libraries_and_configurations"><span class="tocnumber">1</span> <span class="toctext">Simple transferring of the storage with libraries and configurations</span></a></li> <li class="toclevel-1 tocsection-2"><a href="#Separation_of_the_desired_configuration"><span class="tocnumber">2</span> <span class="toctext">Separation of the desired configuration</span></a></li> <li class="toclevel-1 tocsection-3"><a href="#Low-level_copy_of_the_DB_content"><span class="tocnumber">3</span> <span class="toctext">Low-level copy of the DB content</span></a></li> </ul> </div> <h3><span class="mw-headline" id="Simple_transferring_of_the_storage_with_libraries_and_configurations"><span class="mw-headline-number">1</span> Simple transferring of the storage with libraries and configurations</span></h3> <p>If you took into account the above recommendations and all your uniform developments are contained in a separate storage-DB, then the entire transferring process will consist in copying and connecting the storage in a new project or in it simple connecting for network DBMS. </p><p>The procedure for copying the storage-DB depends on the type of the storage and should be read in the relevant documentation. </p><p><a href="Modules/SQLite.html" title="Special:MyLanguage/Modules/SQLite">SQLite databases</a> in the form of separate <b>*.db</b> files are usually used for concomitant distribution with OpenSCADA distributions. Copying of the SQLite database, respectively, is the simple copying of the the required database file from <a href="Program_manual.html#Projects" title="Special:MyLanguage/Documents/Program manual">the project-database folder</a> of the old project to the project folder of the new one. </p><p>Connection is made by creating a new database object in the module of the required type of the subsystem "DB" and its subsequent configuration (<a href="Program_manual.html#CfgDB" title="Special:MyLanguage/Documents/Program manual">read more</a>). After the DB creation, configuration and enabling you can immediately download the DB data from it by clicking the "Load the program from this DB" on the form of the database object. However, this only involves loading, without enabling-starting the downloaded objects, so that may be easier to restart OpenSCADA. </p> <h3><span class="mw-headline" id="Separation_of_the_desired_configuration"><span class="mw-headline-number">2</span> Separation of the desired configuration</span></h3> <p>If the desired configuration is contained in the <a href="Program_manual.html#Storage" title="Special:MyLanguage/Documents/Program manual">Generic Storage</a> or in the storage of the standard libraries, you need to move it to a different storage. You can move the configuration either to a different storage with your libraries or to the export storage. The export storage, unlike to the library one, only serves to transfer the configuration and will be deleted subsequently. In any case, you must create a new storage of the desired type like to the connection procedure above. To transfer you should use the type that you plan to use in the new project. Usually, it is better to use the SQLite database type for the transfer, because of the simple copying procedure for it. However, if you use a network DBMS, the procedure may transform to the simple connection of the library or export storage to the new project. </p><p>Next you must separate the configuration in the library storage of unifying or export, if it can not be directly stored in the storage. Some <a href="Program_manual.html#DAQTmpl" title="Special:MyLanguage/Documents/Program manual">parameter templates</a> or <a href="Program_manual.html#CfgDAQ" title="Special:MyLanguage/Documents/Program manual">controller parameters of the data acquisition</a>, <a href="Modules/VCAEngine.html" title="Special:MyLanguage/Modules/VCAEngine">visual elements of the widget libraries</a>, etc. can be separated by creating a library of export or unifying of the corresponding element. For the new library as a storage should be specified the previously created storage of unifying or export. Further you should copy the necessary elements from the original library to the library of unifying-export via the standard copy function. After copying the unifying-export library must be saved and its content will be appeared in the new storage. </p><p>If necessary to transfer an object with the separate DB field or entire libraries, the operation of creating the intermediate library and subsequent copying can be omitted. It is enough in the DB field to specify the previously created storage of unifying or export and save the element. Then a button will appear next to delete object data from the previous storage, which you can use if this operation is performed within a single project to separate the configuration to an other storage. </p><p>Further action, that is the simple transferring the storage, are performed in accordance with the previous section. </p><p>When you transfer the configuration by exporting it is necessary to perform the reverse process of copying from the export libraries to the local libraries of a new project and deleting of the export storage. </p> <h3><span class="mw-headline" id="Low-level_copy_of_the_DB_content"><span class="mw-headline-number">3</span> Low-level copy of the DB content</span></h3> <p>For transfer you can use selective copy of the DB tables with configuration by: select the table objects in the DB object, call the copy command, select the object of the new DB and call the past command (<a href="Program_manual.html#CfgDB" title="Special:MyLanguage/Documents/Program manual">read more</a>). However, it can be necessary to know the DB structure, about which you can read <a class="external" href="http://oscada.org/wiki/Documents/API#Organization_and_structure_of_the_database_of_the_system_components" title="Documents/API">here</a>. </p> </div><table style="border-top: dotted 2px #999999; margin-top: 20pt; color: gray;" width="100%"><tr><td style="text-align: left;" width="40%"><a href="http://oscada.org/wiki/Documents/How_to/Transferring_project_configuration/en">Documents/How_to/Transferring_project_configuration/en</a> - <a href="http://oscada.org/en/main/about-the-project/licenses/">GFDL</a></td><td style="text-align: center;">March 2025</td><td style="text-align: right;" width="40%">OpenSCADA 1+r3012</td></tr></table></body> </html>