Difference between revisions of "CloneSystem"

From TempusServa wiki
Jump to navigation Jump to search
(Created page with "== What it does == Clones the entire webapp to another server. Only works on linux. == First setup == # Generate an SSH key for the tomcat-user on the source server <code>sudo -u tomcat ssh-keygen</code> # Add the public key to a user on the target server that has sudo-access # Connect from the source server, as tomcat, to the target server and accept the certificate # Add configurations == How to invoke == Invoke the codeunit, as an admin. eg. <code>[SERVER]/main?c...")
 
 
Line 41: Line 41:
!Description
!Description
|-
|-
|targetServer
|CloneSystem.targetServer
|
|
|IP or domain of target server
|IP or domain of target server
|-
|-
|targetUser
|CloneSystem.targetUser
|ec2-user
|ec2-user
|Name of the user that is being used on the target server
|Name of the user that is being used on the target server
|-
|-
|targetBasePath
|CloneSystem.targetBasePath
|Policy:applicationBasePath
|Policy:applicationBasePath
|Webapps, folder on target server
|Webapps, folder on target server
|-
|-
|targetApp
|CloneSystem.targetApp
|Policy:applicationName
|Policy:applicationName
|Application name on target server
|Application name on target server
|-
|-
|targetDb
|CloneSystem.targetDb
|DbLive-name
|DbLive-name
|Name of live server on target server
|Name of live server on target server

Latest revision as of 11:12, 27 May 2024

What it does

Clones the entire webapp to another server.

Only works on linux.

First setup

  1. Generate an SSH key for the tomcat-user on the source server sudo -u tomcat ssh-keygen
  2. Add the public key to a user on the target server that has sudo-access
  3. Connect from the source server, as tomcat, to the target server and accept the certificate
  4. Add configurations

How to invoke

Invoke the codeunit, as an admin. eg.

[SERVER]/main?command=common.CloneSystem

Options

Control the behavior with the following url-parameters.

Parameter Desctiption
with-users Also clones the users and their groups
with-files Also clones the files uploaded
dont-backup-target Does not create a copy of the database on the target server with the name _backupyyyyMMddHHmm
dont-clean Does not remove the sql files on both systems

Configuration

Config Default Description
CloneSystem.targetServer IP or domain of target server
CloneSystem.targetUser ec2-user Name of the user that is being used on the target server
CloneSystem.targetBasePath Policy:applicationBasePath Webapps, folder on target server
CloneSystem.targetApp Policy:applicationName Application name on target server
CloneSystem.targetDb DbLive-name Name of live server on target server

Developer info

  • Type: CodeunitPagecontent
  • Security: Requires session