Refreshing a Test environment with replication

From time to time, any Test environment has to be refreshed with fresh backup from Production. A Test environment with replication requires additional steps for restoring synchronization between sites.

Method 1 - Backup and Restore all separate sites

Backup the office and the vessel database(s) with shortest time possible between each backup made, and restore these databases in the UAT on the separate installation.

 

  1. Stop replication on Test (disable scheduler, manually execute Receive and Import only). Because the Replicator Scheduler stores the settings in the DB, turn off all Replicator Services in the Test environment.

     

  2. Take full Production DB backups on all sites that are represented on Test. Start taking backups from the Main Site.

  3. Save all needed links (settings) from Global Options of the Test system (URL to Crew Portal in Web Services).

  4. Restore backups on the Test SQL server by either restoring as a new database or using the overwrite option. Pay attention to the destination database name and files.

     

  5. Once all backups are restored, a superuser should open Adonis Control Center and retype passwords for inbuilt DB users (ADPW, REPL, AD_UPGRADE). You can skip this step if passwords match between the Prod and Test.

  6. The Adonis DB version on Production often differs from Test; run the APM upgrade to the desired version. If APM versions on Production and Test are the same, you can skip this step.

  7. Login to APM and remove any link or reference to Production services and add saved ones for Test system

    1. Web Service

    2. Crewlink (if applicable)

    3. Global Options

    4. Notification tasks

  8. Remove all files from in\Receive, in\ImportStorage, in\archive, out\send, and out\Archive of all Replicator instances on Test. Start Replicator Service. Run the full replication circle manually, starting from the Main Site. If some replication files appear missing, copy them from the Production Main Site corresponding Archive folder. After the complete replication cycle, enable Replicator Schedulers.

This method requires database backups to be taken as close in time as possible. Otherwise, between steps 6 and 7, superuser would need to synchronize the last import\export file numbers and times between al sites.

Method 2 - Backup and Restore the Office site and replicate to all vessel sites

Backup and Restore the office and reset the replication date.
Restore the office database and set the last replication date back to 01/01/1900, forcing all data to be replicated during the next replication.

Install / backup an empty database on each vessel site and set the last replication cab file nr for each site based on the nr found in the office database. The Replicator continues replicating to the vessel, and the first cab file created contains all data for the vessel from 01/01/1900

 

  1. Stop replication on Test (disable scheduler, manually execute Receive and Import only). Because Replicator Scheduler stores the settings in the DB, turn off all Replicator Services in the Test environment.

  2. Take full Production DB backup from the Main Site.

  3. Restore backup over the Test Main Site DB. You can use the overwrite option. Pay attention to the destination database name and files.

  4. Once the backup is restored, a superuser should open Adonis Control Center and retype passwords for inbuilt DB users (ADPW, REPL, AD_UPGRADE). You can skip this step if passwords match between the Prod and Test.

  5. The Adonis DB version on Production often differs from Test; run the APM upgrade to the desired version. If APM versions on Production and Test are the same, you can skip this step.

  6. Login to APM and remove any link to Production services (Web Service, Crewlink, etc.) Manually restore necessary Test settings (Global Options, Notification tasks, etc.)

  7. Login to APM on the Main Site, and set all vessel sites and corresponding channels to inactive.

    Create new sites and channels for the Test vessels keeping the Organization’s assignment.

     

  8. On satellite sites, uninstall all Adonis applications.

    Clean the Adonis application folders from any remaining files.
    Rename or delete the old Test vessel Adonis database.

     

  9. Continue by installing all necessary Adonis applications on the Test vessels using the new site numbers. Follow the same procedure as for creating a new vessel installation.

     

  10. Execute the script below on the Main Site database.

  11. Remove all files from in\Receive, in\ImportStorage, in\archive, out\send, and out\Archive of all Replicator instances on Test. Start Replicator Service. Run the full replication circle manually, starting from the Main Site. Enable Replicator Schedulers.

 

The first method could be used for systems without replication.