CloneSystem

From TempusServa wiki
Revision as of 10:12, 27 May 2024 by Tvi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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