Skip to main content

Backup.Task

Class Backup.Task Extends (%Persistent, %SYSTEM.Help) [ Final, Inheritance = right, StorageStrategy = BackupTaskStorage ]

A backup task is a backup type and an output device with an optional description. There are a set of system defined tasks which cannot be changed.

Parameters

DOMAIN

Parameter DOMAIN = "%Utility";

Default Localization Domain

Properties

Name

Property Name As %String [ ReadOnly ];

The name of this task.

Type

Property Type As %String(DISPLAYLIST = "/Full/Incremental/Cumulative Incremental", VALUELIST = "/0/1/2");

Type of backup which will be performed.

LastModifiedTime

Property LastModifiedTime As %String [ ReadOnly ];

The date and time this backup task was last modified.

LastRunTime

Property LastRunTime As %String [ ReadOnly ];

The date and time this backup task was last run.

LastRunStatus

Property LastRunStatus As %String [ ReadOnly ];

The status of this backup task's last run. It can be blank if the task has never been run, or else one of the following statuses: "Running", "Completed", or "Failed".

SwitchJournal

Property SwitchJournal As %Boolean;

Indicates whether the journal file should be switched as part of running the backup.

Description

Property Description As %String(MAXLEN = 256);

User-specified description of this backup task. This is stored in the backup history.

Device

Property Device As %SysPath;

User-specified output device for this backup task. This can be a tape device or a directory where the backup files are stored. If this is blank the default is the Backup subdirectory under the directory which contains the IRISSYS database.

DeviceIsTape

Property DeviceIsTape As %Boolean;

True if the output device is a tape.

LastFile

Property LastFile As %String(MAXLEN = 256) [ ReadOnly ];

Date portion of the filename for the last run of this task. The full filename consists of this property plus the .cbk file extension.

Log files are located in the Backup subdirectory under the directory that contains the IRISSYS database, and their filenames consist of the LastFile property plus the .log file extension.

SystemTask

Property SystemTask As %Boolean [ ReadOnly ];

Denotes that this is a system task. Certain tasks are defined by the system and cannot be modified.

Methods

%LoadData

Method %LoadData(id As %String, flag As %Boolean) As %Status [ Private ]

Overrides the default %LoadData method.

%SaveData

Method %SaveData(id As %String) As %Status [ Private ]

%DeleteData

ClassMethod %DeleteData(id As %String, concurrency As %Integer) As %Status [ Private ]

This callback method is invoked by the %Delete method to remove the data when an instance is deleted.

If this method returns an error then the object will not be created.

%OnNew

Method %OnNew(newtask As %RawString) As %Status [ Private ]

This callback method is invoked by the %New method to provide notification that a new instance of an object is being created.

The name of the new task must be specified as the argument to the %New() method and is resitricted to alphanumeric characters.

If this method returns an error then the object will not be created.

DeviceGet

Method DeviceGet() As %String [ Internal ]

GetNormalizedDevice

ClassMethod GetNormalizedDevice(DevicePath As %String = "", DeviceIsTape As %Boolean = 0) As %String [ Internal ]

GetTimestamp

ClassMethod GetTimestamp() As %String [ Internal ]

HistoryExecute

ClassMethod HistoryExecute(ByRef qHandle As %Binary, DateTimeStart As %String = "", DateTimeEnd As %String = "") As %Status

Provides a history of all backup operations that have been executed. The results are in reverse-chronological order.

Input Parameters:

  • DateTimeStart is the starting datetime in $H format for the backup history. If it is a null string then the starting time is the earliest in the recorded history.
  • DateTimeEnd is the ending datetime in $H format for the backup history. If it is a null string then the ending time is the latest in the recorded history.

HistoryClose

ClassMethod HistoryClose(ByRef qHandle As %Binary) As %Status [ PlaceAfter = HistoryExecute ]

HistoryFetch

ClassMethod HistoryFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = HistoryExecute ]

ListExecute

ClassMethod ListExecute(ByRef qHandle As %Binary) As %Status [ Internal ]

Provides a list of all currently defined tasks.
The four built-in tasks are always returned first, followed by any user-defined tasks.

LastFile only has a value if a log file exists from the last run of the backup.

ListFetch

ClassMethod ListFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal ]

ListClose

ClassMethod ListClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = ListExecute ]

ListLogFilesExecute

ClassMethod ListLogFilesExecute(ByRef qHandle As %Binary, task As %String = "") As %Status [ Internal ]

Returns a list of log files that exist for a specified backup task. If no task is specified, returns a list of all log files for all backup tasks.

ListLogFilesFetch

ClassMethod ListLogFilesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal ]

ListLogFilesClose

ClassMethod ListLogFilesClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = ListLogFilesExecute ]