User Guide > Objects > Alphabetical Listing > Rollback Tab

Rollback Tab

The Rollback tab is an object-specific tab that is available in every executable object that can be included in a workflow.

The Rollback tab can be used to define actions that store the task (= Backup) and restore it (= Rollback). These settings are only useful when the object runs in a workflow because you can only start a rollback process within a workflow.

The backup and rollback functions are especially designed to undo erroneous installation and deployment processes that are defined in the Application Release Automation but processed using the Automation Engine.

Backup actions will always be processed before the object is processed, and rollback actions can only be started for workflow tasks that have already ended. For more information, see the related documentation.

User-defined backup actions take place before the file-based backup actions. This is different in rollback actions where file-based rollback actions take place before the user-defined rollback actions.

Field/Element Description
Enable Rollback

Use this to activate or deactivate the rollback settings.

When this option is deactivated, all the fields of this tab are disabled.

Custom Rollback

A user-defined rollback action allows you to roll back tasks through user-defined executable objects.

The following object variables are available for the processing of backup and rollback tasks:

  • &AGENT# - The name of the agent of the task that is used to trigger the backup or rollback action.
  • &LOGIN# - The name of this task's Login object.
  • &RB_FBACKUPPATH# - The path for the file-based rollback action (only applies to jobs and file transfers)
  • &RB_FDELETEBEFORE# - The handling of tasks before they are restored (file-based rollback actions, only applies to jobs and file transfers).
    Possible values: "001" - The affected files are deleted, "000" - No files are deleted
  • &RB_FINCLSUBDIRS# - Handling of subdirectories (file-based rollback actions, only applies to jobs and file transfers)
    Possible values: "001" - Subdirectories are considered, "000" - Subdirectories are not considered

Note that variables of the same name will be overwritten in the Backup or Rollback object.

Backup

Specify an executable object that is responsible for the backup process.

If you specify a Backup object, it will always automatically run before the task runs, regardless of how the object is activated.

The actions and steps that must be defined in the Backup object depend on the processes and actions of the related task. Note that you must define them manually. For example, if you use an object to update your databaseA database is an organized collection of data including relevant data structures., it is useful to include a database using the Backup object.

After the backup task has successfully ended, the object variable &RB_CBACKUP_RUNID# will automatically be created within the task that triggers the backup process. This variable stores the RunID of the backup task.

Rollback

Specify an executable object that is responsible for the rollback process.

The definition of the Rollback object depends on the current object or the Backup object and must be made manually. The Rollback object's basic task is to undo modifications in the case of an error in order to ensure that a previous working status will be restored. For example, if the Backup object creates a database backup, the Rollback object should be able to restore this backup.

The Rollback object will be processed when the task starts in rollback mode which is only possible in a workflow.

File Rollback

A file-based rollback is only available for job and file transfer objects that run on Windows or UNIX. In other objects, the corresponding fields are disabled.

For a file-based rollback of jobs, the system uses the job's agent, and for a file-based rollback of file transfers, it uses the destination agent.

Backup

Specify the path or file(s) that should be stored.

If you do not specify file names, the directory's complete content will be backed up. To include sub-folders, you must select the option Include sub-directories.

By default, empty sub-directories are not included when the option Include sub--directories is active. You can change this behavior setting the value "1"object variable &rb_fbackup_copy_empty_dir# of the object (Variables & Prompts tab). With this variable being set, empty sub-directories will also be copied during the backup process.

You can use the wildcard characters * and ? in the file name. * is a placeholder for any number of characters (0 - n) and ? represents exactly one character. This allows you to select files with a certain name and ending.

Examples for Windows:
C:\temp\test.txt
C:\temp\*.txt
C:\temp\ or C:\temp\*
C:\temp\test??.*

Note that using wildcard characters is allowed in file names but they must not be used within the path.

The specified directory or files are automatically copied to the following directory each time before the object runs:
<Backup folder>/<Client>/<Date>/<RunID>/

You define the backup folder in the INI files of the agents (in the [VARIABLES] section) with the agent variable UC_EX_PATH_BACKUP. By default, the system uses "..\BACKUP" (Windows) or "../backup" (Unix) as its backup folder (on the operating system of the files and folders that should be backed up.

For example:
To be backed up: C:\AUTOMIC\source\*.txt
Backup folder: C:\AUTOMIC\backup

UNIX: The files are not directly stored in the directory above but in a TAR archive that uses the RunID as its name.

Before you run the object, make sure that there is enough local disk space for the file backup and that the OS user has all the required rights.

The backup folder's contents are deleted in regular intervals. You can define how long the files should be stored and when they should be checked with the settings BACKUP_RETENTION_CHECK and BACKUP_RETENTION_LIFETIME. These are available in the variable UC_HOSTCHAR*.

When you run a file-based backup from a non-existing file path, this path will be deleted during the rollback process provided that it has previously been created when the job has been processed. No error occurs in this case, neither in the backup, nor in the rollback process.

If the task starts in rollback mode, the files are copied from the backup folder to the directory that should be backed up.

Delete before restore

This field affects rollbacks.

If this option is active, the content of the original directory that was used to create a backup will be deleted before the backup folder is restored (see the description above of the Backup field). This ensures that the destination directory is empty before the files are copied from the backup folder and avoids potential errors.

Sub-folders will only be deleted if the option Include sub-directories is active.

Include sub-directories Sub-directories and their contents will be included in backup, deletion and restore processes.