...
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.
Take full Production DB backup from the Main Site.
Restore backup over the Test Main Site DB. You can use the overwrite option. Pay attention to the destination database name and files.
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.
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.
Login to APM and remove any link to Production services (Web Service, Crewlink, etc.) Manually restore necessary Test settings (Global Options, Notification tasks, etc.)
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.
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.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.
Execute the script below on the Main Site database.
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.
...