Skip to main content

SYS.ArchiveManager

Class SYS.ArchiveManager Extends %RegisteredObject

Managing Archive

Methods

ZFFlags

ClassMethod ZFFlags(Verbose As %Boolean) As %String [ Internal ]

PutFile

ClassMethod PutFile(FilePath As %SysPath, ArchiveName As %String, ByRef ArchiveSpec As %String, Move As %Boolean = 0, Verbose As %Boolean = 0) As %Status

Put a file given by 'FilePath' on a given archive destination.
Parameters:
FilePath: the path of the source file
ArchiveName: the name of the archive destination defined in CPF file
ArchiveSpec (input/output): the specification of the archive destination, i.e., a comma-delimited string of the type and the location of the archive destination.
Move: whether to remove the source file. Default is No.
Verbose: whether to display output messages from the command. Default is No.

GetFile

ClassMethod GetFile(FilePath As %SysPath, ArchiveSpec As %String, Move As %Boolean = 0, Verbose As %Boolean = 0) As %Status

Copy a file to 'FilePath' from a given archive source.
Parameters:
FilePath: the path of the destination file
ArchiveSpec: the specification of the archive source, i.e., a comma-delimited string of the type and the location of the archive source.
Move: whether to remove the file from the archive source. Default is No.
Verbose: whether to display output messages from the command. Default is No.

DeleteFile

ClassMethod DeleteFile(FileName As %SysPath, ArchiveSpec As %String, Verbose As %Boolean = 0) As %Status

Delete a file from a given archive target.
Parameters:
FileName: the name of the file to delete (case sensitive)
ArchiveSpec: the specification of the archive target where the file is located, i.e., a comma-delimited string of the type and the location of the archive target.
Verbose: whether to display output messages from the command. Default is No.

CollectNonMirrorFilesInfo

ClassMethod CollectNonMirrorFilesInfo(QTI As %Integer, ArchiveType As %String = "", Location As %String = "") As %Status [ Internal ]

Parse and store info from ^%SYS("JOURNAL","ARCHIVED","-") in an array of %List strings.
QTI: the index # for $$$ISCQUERYTEMP

CollectMirrorFilesInfo

ClassMethod CollectMirrorFilesInfo(QTI As %Integer, MirrorName As %String, ArchiveType As %String = "", Location As %String = "") As %Status [ Internal ]

Parse and store info from ^%SYS("JOURNAL","ARCHIVED",MirrorName) in an array of %List strings.
QTI: the index # for $$$ISCQUERYTEMP

FileListExecute

ClassMethod FileListExecute(ByRef qHandle As %Binary, FileType As %String = "", MirrorName As %String = "", ArchiveType As %String = "", Location As %String = "") As %Status

List archived files.

Parameters:
FileType -
"" - All record match
MirrorName - Name of the mirror set or "" for non-mirrored journal file.
FilePath - path of the file before archived
ArchiveType - type of the archive target
s3 - AWS S3
rsync - rsync (Unix) or robocopy (Windows)
Location - where the archived file is, e.g., s3://myBucket (s3), host:/dir (rsync) or \\server\dir\ (robocopy)

FileListFetch

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

FileListClose

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