Ensuring TOS Management Commands Run To Completion

Some TOS management commands (such as backup, restore, upgrade, archive, hactl, and da_remote_configurartion.sh) take time to complete. If the network session to the server terminates before the management command has successfully completed, the command will stop running and the system may become unstable. We recommend that you use the screen command to create a named session and run the management command in that session. This ensures that the management command will run to completion even if the network session terminates unexpectedly.

  • To create a named screen session:

    # screen -S <session_name>
    # <TOS_management_command>

    where <session_name> is the name for the screen session (for example TufinCommands) and <TOS_management_command> is the specific TOS command (for example backup or restore).

    The session will be listed as <pid>.<session_name> in the list of screen sessions. Execute the management command from within the new screen session. Exit the screen session when the management command has completed.

  • To list all screen sessions:

    # screen -ls
    There is a screen on:
    6350.TufinCommands (Attached)
    1 Socket in /var/run/screen/S-root.

  • To detach from the screen session:

    Type Ctrl-A and then 'd'.

  • To attach to a named screen session: You can reconnect to a named screen session from another network connection on the server.

    # screen -d -r 6350.TufinCommands

    Note: -d detaches the named screen session if it is attached elsewhere, and -r attaches you to the specified screen session.

  • To terminate a screen session: You must be attached to the screen session to terminate it.

    Do not terminate the screen session while the TOS management command is still running.

    1. Type exit at the prompt, or
    2. Type Ctrl-A,then type ":quit<enter>".