User Backup/Restore facility allows the saving of some Gnosis objects to a tape, as well as the rebuilding of them from the tape. The objects are either Record Collections {Named or Entry sequence without keys} or Fresh Segments. Record Collections with keys are backed up without the keys. It is assumed that User Backup/Restore facility will be expanded into automatic Backup facility for those users willing to compromise their data.
BACKUPF is a factory to produce BACKUP objects.
BACKUPF(0; SB1,M,SB2 ==> c;BACKUP) produces BACKUP object.
BACKUP(kt ==> x'134')
BACKUP(kt+4 ==>;) destroy BACKUP object.
BACKUP(0; DIRECTORY,TAPEACCESS == c;) backup the specified directory to a tape. Only Record Collections and Fresh Segments are backed up from the directory to the tape. If any other objects are in the specified directory, they will be skipped.
c = 1 empty directory or not directory key
c = 3 not a tapeaccess key
c = 5 can not open file on the tape to write
c = 6 record was not written to a tape
c = 7 file on a tape was not closed
c = 8 file was not written , end of tape encountered
OBJ2TAPEF(0;SB1,M,SB2 ==>c;OBJ2TAPE) produces OBJ2TAPE object.
OBJ2TAPE(kt ==> x'534')
OBJ2TAPE(kt+4 ==>;) destroy OBJ2TAPE object.
OBJ2TAPE(FSQ,(FILENAME);TAPEACCESS,FILEKEY == c;) write object to a tape.
FILENAME - string up to 2009 bytes long is allowed. Up to 14 levels of embedded dots are allowed. FILENAME is the name under which object will be saved on a tape.
TAPEACCESS - tape access key.
FILEKEY - key to the object to be backed up.
Return codes
c = 1 invalid file sequence number
c = 2 invalid file name
c = 3 not a tapeaccess key
c = 4 object can not be saved on a tape
c = 5 can not open file on a tape to write
c = 6 record was not written to a tape
c = 7 file on a tape was not closed
c = 8 file was not written, end of tape encountered
TAPE2OBJF(0;SB1,M,SB2 ==>c;TAPE2OBJ) to get TAPE2OBJ object from the factory.
TAPE2OBJ(kt ==> x'734')
TAPE2OBJ(kt+4 ==>;) destroy TAPE2OBJ object.
TAPE2OBJ(FSQ,TAPEACCESS ==> c;(FILENAME),FILEKEY) recreate object from the tape.
TAPEACCESS - tape access key.
FILENAME - returns name , under which object was stored on a tape.
FILEKEY - key to the object which will be created. String up to 2009 bytes is allowed. Up to 14 levels of embedded dots are allowed.
Return codes
c = 1 wrong file sequence number
c = 2 not a tapeaccess key
c = 3 can not open file on a tape to read
c = 4 no more files on a tape or empty tape
c = 5 file close error
c = 6 error in reading record from the tape
c = 7 error in creating an object
RESTOREF(0;SB1,M,SB2 ==>c;RESTORE) get RESTORE object from the factory.
RESTORE(kt ==> x'334')
RESTORE(0;TAPEACCESS,DIRECTORY ==> c)
DIRECTORY - key to a named sequence record collection that is the root of existing directory structure.
c = 1 can not create a directory
c = 2 not a tapeaccess key
c = 3 can not open file on a tape to read
c = 4 no more files on a tape or empty tape
c = 5 file close error
c = 6 error in reading record from the tape
c = 7 error in creating an object
c = 8 can not add the name to the directory or not a directory key