CloneSystem

From TempusServa wiki
Revision as of 11:09, 27 May 2024 by Tvi (talk | contribs) (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...")
(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
targetServer IP or domain of target server
targetUser ec2-user Name of the user that is being used on the target server
targetBasePath Policy:applicationBasePath Webapps, folder on target server
targetApp Policy:applicationName Application name on target server
targetDb DbLive-name Name of live server on target server

Developer info

  • Type: CodeunitPagecontent
  • Security: Requires session