Manually restore agent instances when the automatic restore fails

You are upgrading dynamic agents or fault-tolerant agents using either the centralized agent update method or the twsinst script, but the update process fails and starts the automatic restore process. If the automatic restore process fails, you need to manually restore the old agent instances.

Cause and solution

The automatic restore process might fail for several causes, for example, the automatic process does not have the necessary space to perform the operation. If you want to manually restore the old agent instance, complete the following steps:
  1. On the workstation where the agent is installed, go to the temporary directory, where the selfupdate script backs up the agent installation directory. The default temporary directory value is:
    Centralized agent update method
    On Windows operating systems:
    %TEMP%\backupTWS\date
    On UNIX operating systems:
    /tmp/backupTWS/date
    Where date is the date of the selfupdate running for your agent instance.
    twsinst script upgrade method
    On Windows operating systems:
    <working_dir>>\backupTWS\date
    On UNIX operating systems:
    <working_dir>>/backupTWS/date
    where working_dir> is a temporary directory used by the upgrade process. You define the working_dir> passing the -work_dir parameter to the twsinst script. If you do not define the working_dir> then by default it is set to /tmp/TWA_${INST_USER}/tws94, where tmp is the temporary directory of the operating system and ${INST_USER} is the user performing the upgrade. For example, on a UNIX operating system: /tmp/TWA_jsmith/tws94/backup.
    Where date is the date of the selfupdate running for your agent instance.
  2. Locate the agent_instance_backup_dir backup directory for your agent instance.
  3. Copy the content of the following directory to the TWS_agent_inst_dir agent installation directory:
    Centralized agent update method
    On Windows operating systems:
    %TEMP%\backupTWS\date\agent_instance_backup_dir
    On UNIX operating systems:
    /tmp/backupTWS/date/agent_instance_backup_dir
    twsinst script upgrade method
    On Windows operating systems:
    <working_dir>\backupTWS\date\agent_instance_backup_dir
    On UNIX operating systems:
    <working_dir>/backupTWS/date/agent_instance_backup_dir
  4. In the TWS_agent_inst_dir directory, re-create the stdlist directory.
  5. Manually delete the following lock file:
    Centralized agent update method
    On Windows operating systems:
    %TEMP%\twsselfupdate.lock
    On UNIX operating systems:
    /tmp/twsselfupdate.lock
    twsinst script upgrade method
    On Windows operating systems:
    <working_dir>\twsselfupdate.lock
    On UNIX operating systems:
    <working_dir>/twsselfupdate.lock
  6. Restart the agent instance.