Views:

Further Information
Contact our support team support@lynqmes.com or raise a support case from the Support Portal.

A common question asked by our user base is how can we refresh the data we have in the LYNQ test environment with a recent copy of data from the LYNQ production environment.  Considering LYNQ stores data in LYNQ's proprietary databases and in the ERP database, it is important to understand where data is stored.  Partially restoring individual databases, may either stop the test environment from functioning or cause data integrity issues.

Location of Data

Data Type Location of Data
LYNQ aps Configuration Data ERP Database or Staging Database
LYNQ aps Transactional Data  ERP Database or Staging Database
LYNQ mom Configuration Data LYNQ mom Configuration Database
LYNQ mom Transactional Data LYNQ mom Data Database
LYNQ mom Logic Data LYNQ mom Logic Data
LYNQ mom Live Statistics LYNQ mom Data Live Database
LYNQ mom Factory Automation Data LYNQ mom FA Database
LYNQ api Configuration Data (Instance Settings)
LYNQ api Configuration Data (API Settings)
LYNQ api Transactional Data (Log files etc)
LYNQ api Database
ERP Database or Staging Database
LYNQ api Database


To successfully refresh test data, you should make backups of all the databases above.  If the test and production environments share the same LYNQ api installation and each environment has a separate LYNQ api instance, only the ERP database and all LYNQ databases need to be restored.  

To refresh test data from production where both test and production environments share the same LYNQ api installation, complete these steps:

  1. Turn off automatic SYNC in LYNQ api
    1. Open LYNQ api
    2. Select the Production Instance
    3. Select API Settings
    4. Uncheck the 'Active?' setting to temporarily disable integration from automatically synching in Production
    5. Select Save
    6. Select the Test Instance
    7. Select API Settings
    8. Uncheck the 'Active?' setting to temporarily disable integration from automatically synching in Test
    9. Select Save 
  2. Make backups of the databases listed in the table above (except the LYNQ api database)
  3. Make a note of all the databases that are configured to be used in the LYNQ mom test environment
    1. Open LYNQ mom
    2. Select Settings
      1. Make a note of all the databases configured for the LYNQ mom test site
      2. Make a note of the SQL user that is used to connect to the SQL databases
  4. From IIS stop the LYNQ mom test application pool and the LYNQ api/LYNQ api Services application pools
  5. Restore the backups taken in step 2 to the original database names noted in step 3.2.1
  6. From the SQL Management Studio check that the SQL user noted in step 3.2.2 has db_owner rights to the restored databases
  7. From IIS start the LYNQ mom test application pool and the LYNQ api/LYNQ api Services application pools
  8. Reset the integration settings for the test environment
    1. Open LYNQ api
    2. Open the Test Instance
    3. Select API Settings
    4. Amend the Integration Settings and the MOM Data Database name so it correctly matches the test environment
      1. Amend all API Service Settings
      2. Amend MOM Settings
        1. MOM Data Database
    5. Check the 'Active?' setting to enable automatic integration
    6. Select Save
    7. Open the Production Instance
    8. Check the 'Is Active' setting to enable automatic integration
  9. Open the LYNQ mom test site
  10. Check that the data displayed appears to be from the backup taken of Production.


If the test environment has a separate LYNQ api test installation the LYNQ api database must not be backed up and restored from production. The LYNQ api database stores important integration connection details to the connected ERP database.  Therefore if a backup of the LYNQ api production database is restored to the test environment, any integration settings that determine which ERP LYNQ will SYNC to will also be restored.  Performing this action without disabling the integration in the production environment first, will result in test transactions being posted to the Production ERP database.  For this reason, it is recommended that the LYNQ api database is never restored from the Production Environment.  Therefore you should leave this out of the restore process.

Note:  If you are in the process of implementing LYNQ and you want to refresh the test environment with a recent copy of your ERP data, please be aware if Visual APS has not been configured in the production environment, restoring a backup of your production ERP database to your test environment will wipe the Visual APS configuration data.