Rollback Page
Rollbacks restore Workflows, or tasks in a Workflow, to an earlier stage in the execution process. The rollback function lets you resolve errors and undo modifications. As a developer and object designer, you configure the rollback procedure on the Rollback page of objects that can be part of a Workflow. Defining a rollback comprises the following steps:
- Defining the backup tasks.
- (UNIX and Windows Jobs for File Transfers only) Defining the backup path.
- Defining the rollback tasks.
For more information about the rollback process, see Working with Rollbacks.
This page includes the following:
Defining the Rollback Settings
- On the Rollback page, activate the Enable Rollback check box to enable this function and display the available settings.
-
Define the Backup Task.
Select the object that should execute the backup process. It contains the actions and steps that will be carried out to backup the tasks performed by the object you are currently defining. The backup task must include any object, database, etc., that is affected by the backup process. For example, if you use an object to update the database, include a database in the backup object.
If the backup task ends successfully, the
&RB_CBACKUP_RUNID#
object variable is automatically created in the task that triggers the backup process. This variable stores the RunID of the backup task -
Define the Rollback Task.
Select the object that executes the rollback process and restores the task to its last successful status.
-
(UNIX and Windows Jobs and File Transfers only) Enter the Backup Path. The task files stored in the backup folder are copied to the path you specify here. If you do not include the file name in the path, the complete content of the folder is backed up.
Alternative: Define the backup folder in the [VARIABLES] section of the Agent INI file using the UC_EX_PATH_BACKUP Agent variable. By default, the system uses ..\BACKUP (Windows) or ./backup" (Unix) as backup folder.
Prerequisites:
- There is enough disk space for the backup
- The OS user has the required rights
Notes:
- For Jobs, the system uses the Agent assigned to the Job object
- For File Transfers, the system uses the destination Agent
Examples (Windows):
- C:\temp\text.txt
- C:\temp\*.txt
- C:\temp\ or C:\temp\*
- C:\temp\text??.*
Example:
Folder to be backed up:
C:\AUTOMIC\source\*.txt
Backup folder:
C:\AUTOMIC\backup
Note: For UNIX, the files are not stored directly in the directory above but in a TAR archive that uses the RunID as its name.
Recommendations
- The backup folder is cleaned up in regular intervals. You can define the retention period of the files using the following settings for the
UC_HOSTCHAR*
variable:BACKUP_RETENTION_LIFETIME
: Defines the time period, how long a file is kept.BACKUP_RETENTION_CHECK
: Defines when the files are checked.
- When you run a file-based backup from a non-existing path, the path is deleted during the rollback process, provided it was previously created during the file transfer process. No errors occur in this case, neither in the backup nor in the rollback process.
-
Optionally, activate Delete before Restore. This checkbox is only visible if you have entered a backup path.
If you activate this option, the content of the original directory used to create a backup is deleted before the backup folder is restored. This ensures that the destination directory is empty before the files are copied from the backup folder, thus avoiding potential errors.
Sub folders are deleted only if the Include Sub directories option is also activated.
-
Optionally, activate Include Sub directories.
Activate this option if you want to include sub folders in the backup path.
By default, empty sub directories are not copied during the backup process. If you want to include empty folders in the backup, you must set the
&RB_FBACKUP_COPY_EMBTY_DIR
Object properties variable to "1".If you do not specify a file name here, the complete content of the directory is backed up.
You can use the following wildcard characters in the name:
- * ( as placeholder for any number of characters)
- ? (as placeholder for exactly one character). This allows you to select files with a certain name and ending.
Important! Wildcard characters can be used in the file name, not within the path.
Using Variables in Backup and Rollback Tasks
To help you automate your rollbacks, you can use the following variables when defining the backup and rollback tasks:
-
&AGENT#
Name of the Agent of the task that is used to trigger the backup or rollback action
-
&LOGIN#
Name of the Login object assigned to the backup or rollback task.
-
(UNIX and Windows Jobs and File Transfers only) &RB_FBACKUPPATH#
Path for the file-based rollback action
-
(UNIX and Windows Jobs and File Transfers only) &RB_FDELETEBEFORE#
Handling of tasks before they are restored
Possible values:
- 001 - The affected files are deleted
- 000 - No files are deleted
-
(UNIX and Windows Jobs and File Transfers only) &RB_FINCLSUBDIRS#
Handling of subdirectories
Possible values:
- 001 - Subdirectories are considered
- 000 - Subdirectories are not considered
-
(File Transfers only) &$DST_FILE#
Predefined variable to specify the target in the Backup Path
Note: Variables of the same name are overwritten in the backup or rollback object.
See also: