Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [Backup] >  [Task]
Private  Storage   

persistent class Backup.Task extends %Persistent, %SYSTEM.Help

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.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 11 16 3


Summary

Properties
%Concurrency Description Device DeviceIsTape
LastFile LastModifiedTime LastRunStatus LastRunTime
Name SwitchJournal SystemTask Type

Methods
%%OIDGet %1Check %AddJrnObjToSyncSet %AddToSaveSet
%AddToSyncSet %BMEBuilt %BindExport %BuildIndices
%BuildObjectGraph %CheckConstraints %CheckConstraintsForExtent %ClassIsLatestVersion
%ClassName %Close %ComposeOid %ConstructClone
%Delete %DeleteExtent %DeleteId %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %DowngradeConcurrency %ExecuteAfterTriggers
%ExecuteBeforeTriggers %Exists %ExistsId %Extends
%FileIndices %GUID %GUIDSet %GetLock
%GetParameter %GetSwizzleObject %Id %IncrementCount
%IsA %IsModified %IsNull %JournalObject
%KillExtent %LockExtent %LockId %New
%NormalizeObject %ObjectIsNull %ObjectModified %Oid
%OnBeforeAddToSync %OnDetermineClass %Open %OpenId
%OriginalNamespace %PackageName %PurgeIndices %Reload
%RemoveFromSaveSet %ResolveConcurrencyConflict %RollBack %SQLAcquireLock
%SQLAcquireTableLock %SQLAfterTriggers %SQLBeforeTriggers %SQLBuildIndices
%SQLBuildPurgeIndexForRow %SQLBuildPurgeIndices %SQLCheckUnique %SQLCheckUniqueIndices
%SQLCheckUniqueKeys %SQLCopyIcolIntoName %SQLCopyNameIntoIcol %SQLCreateInsDelTables
%SQLDefineiDjVars %SQLDelete %SQLDeleteChildren %SQLDeleteTempStreams
%SQLEExit %SQLExists %SQLFKeyDelLock %SQLFastInsert
%SQLFieldValidate %SQLGetLock %SQLGetOld %SQLGetOldAll
%SQLGetOldIndex %SQLInsert %SQLInsertComputes %SQLInsertStreams
%SQLInvalid %SQLInvalid2 %SQLMVDelete %SQLMVIndexDelete
%SQLMVIndexInsert %SQLMVIndexUpdate %SQLMVInsert %SQLMVUpdate
%SQLMissing %SQLNormalizeCompFields %SQLNormalizeFields %SQLPurgeIndices
%SQLQuickBulkInsert %SQLQuickBulkLoad %SQLQuickBulkSave %SQLQuickBulkUpdate
%SQLQuickDelete %SQLQuickDeleteChildren %SQLQuickFindPKeyByRowID %SQLQuickFindRowIDByPKey
%SQLQuickInsert %SQLQuickLoad %SQLQuickLoadChildren %SQLQuickLogicalToOdbc
%SQLQuickOdbcToLogical %SQLQuickUpdate %SQLReleaseLock %SQLReleaseTableLock
%SQLStorageValidation %SQLTrigDelTab %SQLTrigInsTab %SQLUnlock
%SQLUnlock2 %SQLUnlockError %SQLUnlockRef %SQLUpdate
%SQLUpdateComputes %SQLUpdateStreams %SQLValidateCompFields %SQLValidateFields
%SQLicompView %SQLnBuild %Save %SaveDirect
%SaveIndices %SerializeObject %SetModified %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %UpgradeConcurrency %ValidateIndices %ValidateObject
DeviceGet GetNormalizedDevice GetTimestamp Help
HistoryClose HistoryExecute HistoryFetch ListClose
ListExecute ListFetch ListLogFilesClose ListLogFilesExecute
ListLogFilesFetch


Parameters

• parameter DOMAIN = "%Utility";
Default Localization Domain

Properties

• property Description as %String(MAXLEN=256);
User-specified description of this backup task. This is stored in the backup history.
• 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.
• property DeviceIsTape as %Boolean;
True if the output device is a tape.
• 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.
• property LastModifiedTime as %String [ ReadOnly ];
The date and time this backup task was last modified.
• 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".
• property LastRunTime as %String [ ReadOnly ];
The date and time this backup task was last run.
• property Name as %String [ ReadOnly ];
The name of this task.
• property SwitchJournal as %Boolean;
Indicates whether the journal file should be switched as part of running the backup.
• property SystemTask as %Boolean [ ReadOnly ];
Denotes that this is a system task. Certain tasks are defined by the system and cannot be modified.
• property Type as %String(DISPLAYLIST="/Full/Incremental/Cumulative Incremental",VALUELIST="/0/1/2");
Type of backup which will be performed.

Methods

• private classmethod %DeleteData(id As %String, concurrency As %Integer) as %Status
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.

• private method %LoadData(id As %String, flag As %Boolean) as %Status
Overrides the default %LoadData method.
• private method %OnNew(newtask As %RawString) as %Status
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.

• private method %SaveData(id As %String) as %Status
%SaveData() - saves an object to disk, checks uniqueness and referential integrity constraints, and maintains index structures. This method is implemented by the storage class.
• method DeviceGet() as %String
This is a Get accessor method for the Device property.
• classmethod GetNormalizedDevice(DevicePath As %String = "", DeviceIsTape As %Boolean = 0) as %String
• classmethod GetTimestamp() as %String
• classmethod HistoryClose(ByRef qHandle As %Binary) as %Status
• classmethod HistoryExecute(ByRef qHandle As %Binary, TimeStart As %String = "", TimeEnd As %String = "") as %Status
• classmethod HistoryFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• classmethod ListClose(ByRef qHandle As %Binary) as %Status
• classmethod ListExecute(ByRef qHandle As %Binary) as %Status
• classmethod ListFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• classmethod ListLogFilesClose(ByRef qHandle As %Binary) as %Status
• classmethod ListLogFilesExecute(ByRef qHandle As %Binary, task As %String = "") as %Status
• classmethod ListLogFilesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status

Queries

• query History(DateStart As %String = "", DateEnd As %String = "")
Selects Type As %String, Databases As %String, Time As %String, Journal As %String, LogFile As %String, Status As %String
Provides a history of all backup operations that have been executed. The results are in reverse-chronological order.
• query List()
Selects Name As %String, Type As %String, Device As %String, SwitchJournal As %Boolean, Description As %String, LastModifiedTime As %String, LastRunTime As %String, Status As %String, ReadOnly As %Boolean, IsTape As %Boolean, LastLogFile As %String, StatusStr As %String
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.
• query ListLogFiles(task As %String = "")
Selects Name As %String,
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.


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.