═══ 1. Notices ═══ References in this publication to IBM products, programs or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program, or service is not intended to state or imply that only IBM's product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any of IBM's intellectual property rights may be used instead of the IBM product, program, or service. Evaluation and verification of operation in conjunction with other products, except those expressly designated by IBM, is the user's responsibility. IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. ═══ 1.1. Copyright notices ═══ (C) Copyright International Business Machines Corporation 1995, 1997, 1998. All rights reserved. Note to U.S. Government Users - Documentation related to restricted rights - Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. ═══ 1.2. Trademarks ═══ For a list of IBM and non-IBM trademarks, refer to the online book Trademarks in the Information folder. ═══ 2. How to use the REXX API ═══ Before running any of the REXX commands, it is necessary to initialise the DLL, so that the commands can be correctly interpreted. A sample of some typical code that would appear at the top of a REXX OS/2 Warp Server Backup/Restore program is shown below: Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Say "Could not load the rexxapi dll" Exit End Call PSNSLOADFUNCS This attempts to load the REXX API (PSNSREXX.DLL), and if successful then the individual functions are loaded using the call PSNSLOADFUNCS. Having done this it is then necessary to use PsnsInit to establish contact with the server. The OS/2 Warp Server Backup/Restore REXX API functions can then be run. Finally once the desired commands have been run the PsnsTerm command must be run in order to disconnect from the server. ═══ 3. Starting the API server ═══ To start the API server, you must run the program PSNSD.EXE or double-click on its icon in the OS/2 Warp Server Backup/Restore folder. The syntax of the command is as follows: ┌──────────────────────┐  │ ──PSNSD─┬──────────────────────┼─── │ │ ├─/Pipe:─────┤ │ │ ├─/Port:──┤ │ │ └─/Port:───┘  is the name of a named pipe to listen on  is the name of a service which will be looked up in the TCP/IP services file to decide which port to listen on  is the number of a port to listen on The pipe name, service name or port number should be the same as that which will be passed to PsnsInit in the client which is going to connect to the server. As many named pipes or TCP/IP ports can be opened as are specified on the command line. If you specify /Pipe: without a pipe name, a default pipe name will be used. If you specify /Port: without a port name or service number, the service psnsapi will be looked up in the TCP/IP services file to find out which port to use. ═══ 4. OS/2 Warp Server Backup/Restore functions ═══ This section lists the functions available in the OS/2 Warp Server Backup/Restore REXX API.  Initialisation / termination functions - PsnsInit - PsnsTerm  Backup method functions - PsnsBackupMethodInfo - PsnsCopyBackupMethod - PsnsCreateBackupMethod - PsnsDeleteBackupMethod - PsnsEstimateBackupMethod - PsnsListBackupMethods - PsnsRenameBackupMethod - PsnsRunBackupMethod  Restore method functions - PsnsCopyRestoreMethod - PsnsCreateRestoreMethod - PsnsDeleteRestoreMethod - PsnsEstimateRestoreMethod - PsnsListRestoreMethods - PsnsRenameRestoreMethod - PsnsRestoreMethodInfo - PsnsRunRestoreMethod  Backup set functions - PsnsBackupSetInfo - PsnsCreateBackupSet - PsnsDeleteBackupSet - PsnsEmptyBackupSet - PsnsGetBackupSetConfig - PsnsGetLogFile - PsnsListBackupSets - PsnsSetBackupSetConfig - PsnsTransferBackupSet - PsnsTransferIn  Storage device functions - PsnsCreateStorageDevice - PsnsDeleteStorageDevice - PsnsGetStorageDeviceConfig - PsnsListCreatableStorageDevices - PsnsListStorageDevices - PsnsRefreshStorageDevices - PsnsSetStorageDeviceConfig - PsnsStorageDeviceInfo  Volume functions - PsnsActivateVolume - PsnsAssociateVolume - PsnsCreateVolume - PsnsDeleteVolume - PsnsListVolumeBackupSets - PsnsListVolumes - PsnsVolumeInfo  Schedule event functions - PsnsActivateEvent - PsnsCopyEvent - PsnsCreateEvent - PsnsDeleteEvent - PsnsEventInfo - PsnsGetNextEvent - PsnsListEvents  File filter functions - PsnsAddFileFilterRule - PsnsCopyFileFilter - PsnsCreateFileFilter - PsnsDeleteFileFilter - PsnsDeleteFileFilterRule - PsnsFileFilterInfo - PsnsFileFilterRuleInfo - PsnsListFileFilterRule - PsnsListFileFilters - PsnsRenameFileFilter  Rulebook functions - PsnsAddRulebookRule - PsnsCopyRulebook - PsnsCreateRulebook - PsnsDeleteRulebook - PsnsDeleteRulebookRule - PsnsListRulebookRule - PsnsListRulebooks - PsnsRenameRulebook - PsnsRulebookInfo - PsnsRulebookRuleInfo  Source drive functions - PsnsListSourceDrives - PsnsRefreshSourceDrives - PsnsSelectSourceDrive - PsnsSourceDriveType  Settings and defaults - PsnsDefaultsInfo - PsnsListDefaults - PsnsListSettings - PsnsSettingsInfo  File functions - PsnsAddFile - PsnsBackupFiles - PsnsDropFiles - PsnsListFiles - PsnsPurgeFiles - PsnsRestoreFiles  Utility functions - PsnsGetMessageText ═══ 4.1. PsnsActivateEvent ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsActivateEvent - Syntax ═══ /***************************************************/ /* This function activates or deactivates an event */ /* in the scheduler */ /***************************************************/ Call PsnsActivateEvent handle, eventID, "status" ═══ PsnsActivateEvent - Parameters ═══ handle Handle returned by PsnsInit eventID Event ID of the event to be activated or deactivated. "status" Permitted values are: ACTIVATE Activate the event. DEACTIVATE Deactivate the event. ═══ PsnsActivateEvent - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_EVENT REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsActivateEvent - Remarks ═══ Use this function to activate or deactivate an event in the OS/2 Warp Server Backup/Restore scheduler. When an event is deactivated, nothing will happen when the event's time is reached. This can be useful to temporarily stop a scheduled backup happening, for example during a vacation or during system maintenance. status is in quotes to ensure that its case is correct. ═══ PsnsActivateEvent - Related functions ═══  PsnsCopyEvent  PsnsCreateEvent  PsnsDeleteEvent  PsnsEventInfo  PsnsGetNextEvent  PsnsListEvents ═══ 4.2. PsnsActivateVolume ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsActivateVolume - Syntax ═══ /***************************************************/ /* This function marks a volume as active */ /* or inactive */ /***************************************************/ Call PsnsActivateVolume handle, volumeID, "status" ═══ PsnsActivateVolume - Parameters ═══ handle Handle returned by PsnsInit volumeID Volume ID of the volume to be activated or deactivated. "status" Permitted values are: ACTIVATE Activate the volume. DEACTIVATE Deactivate the volume. ═══ PsnsActivateVolume - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_VOLUME PSNS_FIXED_VOLUME PSNS_INDEX_DISKETTE PSNS_TRANSFERRED_OUT PSNS_IN_USE REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsActivateVolume - Remarks ═══ Use this function to mark a volume as available or unavailable. When a volume is marked as unavailable (deactivated), OS/2 Warp Server Backup/Restore will not ask you for that volume when performing a backup. If you try to restore files from a backup set which contains deactivated volumes, you will see a warning message and files on the deactivated volumes will not be restored. status is in quotes to ensure that its case is correct. ═══ PsnsActivateVolume - Related functions ═══  PsnsAssociateVolume  PsnsCreateVolume  PsnsDeleteVolume  PsnsListVolumeBackupSets  PsnsListVolumes  PsnsVolumeInfo ═══ 4.3. PsnsAddFile ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsAddFile - Syntax ═══ /***************************************************/ /* This function adds a file or group of files to */ /* the list of files to be backed up, restored or */ /* dropped manually. */ /***************************************************/ Call PsnsAddFile handle, "filename" ═══ PsnsAddFile - Parameters ═══ handle Handle returned by PsnsInit "filename" Name of the file to be added to the list. To add all files in a given directory to the list, append a backslash (\) to the directory name. To add all files in a given directory, and all files in all subdirectories beneath that directory, use a filename such as C:\Programs\*\. No other wildcards are allowed in the filename. ═══ PsnsAddFile - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_PATH REXX_INVALID_HANDLE ═══ PsnsAddFile - Remarks ═══ Use this function to add a file or group of files to the list of files to be backed up, restored or dropped. When you have added all the necessary files to the list, they can be backed up using PsnsBackupFiles, restored using PsnsRestoreFiles, or dropped using PsnsDropFiles. If you choose to cancel the operation and not backup or restore the files, call PsnsPurgeFiles to empty the list without taking any other action. The list of files in the list can be obtained using PsnsListFiles. If there is a list of files which you commonly back up, you should consider using a backup method with a rulebook to back up the files, instead of this function. filename is in quotes to ensure that its case is correct. ═══ PsnsAddFile - Related functions ═══  PsnsBackupFiles  PsnsDropFiles  PsnsListFiles  PsnsPurgeFiles  PsnsRestoreFiles ═══ 4.4. PsnsAddFileFilterRule ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsAddFileFilterRule - Syntax ═══ /***************************************************/ /* This function adds a new rule to a file filter */ /***************************************************/ Call PsnsAddFileFilterRule handle, "stemname", "filefiltname", position ═══ PsnsAddFileFilterRule - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem in which the information to be added is to be put. Stemname parameters which may be used are: 0drive Drive letter of file to be included / excluded, or an asterisk (*) for all drives. 0directory Directory to be included / excluded. 0pattern Filename(s) to be included / excluded. Wildcards may be used. 0subdirectories Permitted values are: 1 Also include / exclude subdirectories in the specified directory. 0 Do not include / exclude subdirectories. 0include Permitted values are: 1 Include the specified files. 0 Exclude the specified files. "filefiltname" Name of the file filter to which the rule is to be added. position This specifies the position where the rule is to be added to the file filter; 1 means add at the beginning, 2 after the first rule and so on. ═══ PsnsAddFileFilterRule - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_FILE_FILTER PSNS_INVALID_DRIVE PSNS_INVALID_PATH PSNS_INVALID_FILENAME PSNS_INVALID_POSITION REXX_INVALID_HANDLE ═══ PsnsAddFileFilterRule - Remarks ═══ Use this function to add a new rule to a file filter. The rules are applied in order, from first to last, to decide which files will be backed up. You can add the new rule in any position before the 'last' rule. See File filters for more information about the 'last' rule. stemname and filefiltname are in quotes to ensure that their cases are correct. ═══ PsnsAddFileFilterRule - Related functions ═══  PsnsDeleteFileFilterRule  PsnsFileFilterRuleInfo  PsnsListFileFilterRule ═══ 4.5. PsnsAddRulebookRule ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsAddRulebookRule - Syntax ═══ /***************************************************/ /* This function adds a new rule to a rulebook */ /***************************************************/ Call PsnsAddRulebookRule handle, "stemname", "rulebookName", position ═══ PsnsAddRulebookRule - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem in which the information to be added is to be put. Stemname parameters which may be used are: 0drive Drive letter to include / exclude, or an asterisk (*) for all drives. 0directory Directory to include / exclude. 0pattern Filename(s) to be included / excluded. Wildcards may be used. 0subdirectories Permitted values are: 1 Also include / exclude subdirectories in the specified directory. 0 Do not include / exclude subdirectories. 0generations Number of generations to keep of specified files. 0compression Permitted values are: COMPRESSION Compress the specified files. NOCOMPRESSION Do not compress the specified files. DEFAULT Use the default compression for the specified files. "rulebookName" Name of the rulebook to which the rule is to be added. position This specifies the position where the rule is to be added to the file filter; 1 means add at the beginning, 2 after the first rule and so on. ═══ PsnsAddRulebookRule - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RULEBOOK PSNS_INVALID_DRIVE PSNS_INVALID_PATH PSNS_INVALID_FILENAME PSNS_INVALID_POSITION REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsAddRulebookRule - Remarks ═══ Use this function to add a new rule to a rulebook. The rules are applied in order, from first to last, to decide whether compression will be used and how many generations to keep of individual files. You can add the new rule in any position before the 'last' rule. See Rulebooks for more information about the 'last' rule. stemname and rulebookName are in quotes to ensure that their cases are correct. ═══ PsnsAddRulebookRule - Related functions ═══  PsnsDeleteRulebookRule  PsnsListRulebookRule  PsnsRulebookRuleInfo ═══ 4.6. PsnsAssociateVolume ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsAssociateVolume - Syntax ═══ /***************************************************/ /* This function associates an existing volume with*/ /* a backup set. */ /***************************************************/ Call PsnsAssociateVolume handle, volumeID, "backupSet" ═══ PsnsAssociateVolume - Parameters ═══ handle Handle returned by PsnsInit volumeID Volume ID of the volume to be activated or deactivated. "backupSet" The name of the backup set with which to associate the volume. ═══ PsnsAssociateVolume - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_VOLUME PSNS_INVALID_BACKUP_SET PSNS_ALREADY_ASSOCIATED PSNS_INAPPROPRIATE_BACKUP_SET PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsAssociateVolume - Remarks ═══ Use this function to associate a volume with a backup set. This means that when you perform a backup to the backup set, OS/2 Warp Server Backup/Restore will consider the volume when it is looking for a volume with free space to store backed-up data. This can be useful, for example, when scheduling an overnight backup to tape: you can create a new volume in advance and associate it with the backup set; then OS/2 Warp Server Backup/Restore can automatically use the new volume when it comes to do the backup, rather than prompting for a new volume. backupSet is in quotes to ensure that its case is correct. ═══ PsnsAssociateVolume - Related functions ═══  PsnsActivateVolume  PsnsCreateVolume  PsnsDeleteVolume  PsnsListVolumeBackupSets  PsnsListVolumes  PsnsVolumeInfo ═══ 4.7. PsnsBackupFiles ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsBackupFiles - Syntax ═══ /***************************************************/ /* This function backs up the list of files created*/ /* by calls to PsnsAddFile */ /***************************************************/ Call PsnsBackupFiles handle, "stemname" ═══ PsnsBackupFiles - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem in which the information to be used is to be put. Stemname parameters which may be used are: 0compression Permitted values are: COMPRESSION Compress the specified files. NOCOMPRESSION Do not compress the specified files. DEFAULT Use the default compression for the specified files. 0generations Number of generations to keep of specified files. 0changedFilesOnly Permitted values are: 1 Only back up files which have changed since the last backup to this backup set. 0 Back up all files, regardless of whether they have changed. 0backupSet The name of the backup set to which the files are to be backed up. If this is left blank, then the default backup set will be used. ═══ PsnsBackupFiles - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_INVALID_GENERATIONS PSNS_INVALID_COMPRESSION PSNS_TRANSFERRED_OUT PSNS_IN_USE REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsBackupFiles - Remarks ═══ Use this function to backup a list of files. stemname is in quotes to ensure that its case is correct. ═══ PsnsBackupFiles - Related functions ═══  PsnsAddFile  PsnsDropFiles  PsnsListFiles  PsnsPurgeFiles  PsnsRestoreFiles ═══ 4.8. PsnsBackupMethodInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsBackupMethodInfo - Syntax ═══ /***************************************************/ /* This function gets or sets all the information */ /* about a backup method */ /***************************************************/ Call PsnsBackupMethodInfo handle, "stemname" ═══ PsnsBackupMethodInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may have their values changed or filled in by the API are: 0name The name of the backup method; this is always required. 0description The description of the backup method. 0allFiles Permitted values are: 1 Allow backup of any file; the drive, directory and subdirectories fields are ignored. 0 Allow backup of files specified by the drive, directory and subdirectories fields. 0drive Drive letter to back up files from; an asterisk (*) means all drives. 0directory Directory to back up files from. This may end in an asterisk (*) to allow matching of more than one directory. 0subdirectories Permitted values are: 1 Include subdirectories of the specified directory. 0 Do not include subdirectories. 0compression Permitted values are: COMPRESSION Compress data. NOCOMPRESSION Don't compress data. DEFAULT Use default compression. 0generations Number of generations of files to keep backed up. 0useRulebook Permitted values are: 1 Use the rulebook named in rulebook. The compression and generations fields are ignored. 0 Do not use a rulebook; use the settings in compression and generations. The rulebook field is ignored. 0rulebook Name of the rulebook to use. If this is blank, then the default rulebook is used. 0useFileFilter Permitted values are: 1 Use the file filter named in fileFilter to decide which files to back up. 0 Back up all the files in the selected directory. fileFilteris ignored. 0fileFilter Name of the file filter to use. If this is blank, then the default file filter is used. 0changedFilesOnly Permitted values are: 1 Only back up files which have changed since the last backup to this backup set. 0 Back up all files, regardless of whether they have changed. 0preview Permitted values are: 1 Show a preview before the backup and allow the user to select or deselect individual files. 0 Do not show a preview. Note: Showing a preview is only useful if the backup method is to be run from the OS/2 Warp Server Backup/Restore window; it is not possible to show a preview when running a backup method using the API. 0backupSet Backup set to which to back up data. If this is left blank, then the default backup set will be used. ═══ PsnsBackupMethodInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_INVALID_DRIVE PSNS_INVALID_PATH PSNS_INVALID_MASK PSNS_INVALID_COMPRESSION PSNS_INVALID_GENERATIONS PSNS_INVALID_RULEBOOK PSNS_INVALID_FILE_FILTER PSNS_INVALID_BACKUP_SET REXX_INVALID_HANDLE REXX_INVALID_MASK_NAME ═══ PsnsBackupMethodInfo - Remarks ═══ Use this function to change a backup method or to inspect the current settings for a backup method. In order to look at the settings without changing any, do not create any compound variables except that of the backup method name, the API then fills in all the compound variables, so as to show the current settings. Putting in a parameter means that it will be changed, from its old value. This, however is not true for the name field. It is not possible to change the name of a backup method with this call; to do that, use PsnsRenameBackupMethod stemname is in quotes to ensure that its case is correct. ═══ PsnsBackupMethodInfo - Related functions ═══  PsnsCopyBackupMethod  PsnsCreateBackupMethod  PsnsDeleteBackupMethod  PsnsEstimateBackupMethod  PsnsListBackupMethods  PsnsRenameBackupMethod  PsnsRunBackupMethod ═══ 4.9. PsnsBackupSetInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsBackupSetInfo - Syntax ═══ /***************************************************/ /* This function gets or sets all the information */ /* about a backup set */ /***************************************************/ Call PsnsBackupSetInfo handle, "stemname" ═══ PsnsBackupSetInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may have their values changed or filled in by the API are: 0name The name of the backup set; this is always required. 0description Description of the backup set. ═══ PsnsBackupSetInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsBackupSetInfo - Remarks ═══ Use this function to change a backup set or to inspect the current settings for a backup set. In order to look at the settings without changing any, do not create any compound variables except that of the backup set name, the API then fills in all the compound variables, so as to show the current settings. Putting in a parameter means that it will be changed, from its old value. This, however is not true for the name field. It is not possible to change the configuration string for a backup set with this call; to do that, use PsnsSetBackupSetConfig. To look at the information for all the backup sets, use the command PsnsListBackupSets. It is not possible to change which storage device a backup set uses; to do that, you must delete the backup set and create a new one. The stemname is in quotes to ensure that its case is correct. ═══ PsnsBackupSetInfo - Related functions ═══  PsnsCreateBackupSet  PsnsDeleteBackupSet  PsnsEmptyBackupSet  PsnsGetBackupSetConfig  PsnsGetLogFile  PsnsListBackupSets  PsnsSetBackupSetConfig  PsnsTransferBackupSet  PsnsTransferIn ═══ 4.10. PsnsCopyBackupMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCopyBackupMethod - Syntax ═══ /***************************************************/ /* This function creates a new backup method which */ /* is a copy of an existing backup method */ /***************************************************/ Call PsnsCopyBackupMethod handle, "name", "newName" ═══ PsnsCopyBackupMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the existing backup method which you wish to copy. "newName" The name of the new backup method. ═══ PsnsCopyBackupMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_METHOD PSNS_ALREADY_EXISTS PSNS_INVALID_NAME REXX_INVALID_HANDLE ═══ PsnsCopyBackupMethod - Remarks ═══ Use this function to create a new backup method which is a copy of an existing one. newName must not be the same as the name of any existing backup method. name and newName are in quotes to ensure that their cases are correct. ═══ PsnsCopyBackupMethod - Related functions ═══  PsnsBackupMethodInfo  PsnsCreateBackupMethod  PsnsDeleteBackupMethod  PsnsEstimateBackupMethod  PsnsListBackupMethods  PsnsRenameBackupMethod  PsnsRunBackupMethod ═══ 4.11. PsnsCopyEvent ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCopyEvent - Syntax ═══ /***************************************************/ /* This function creates a new event which is a */ /* copy of an existing event. */ /***************************************************/ Call PsnsCopyEvent handle, eventID ═══ PsnsCopyEvent - Parameters ═══ handle Handle returned by PsnsInit eventID The ID of the existing event which you wish to copy. ═══ PsnsCopyEvent - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_EVENT REXX_INVALID_HANDLE ═══ PsnsCopyEvent - Remarks ═══ Use this function to create a new event which is a copy of an existing one. The ID of the newly-created event is returned in the REXX variable newEventID ═══ PsnsCopyEvent - Related functions ═══  PsnsActivateEvent  PsnsCreateEvent  PsnsDeleteEvent  PsnsEventInfo  PsnsGetNextEvent  PsnsListEvents ═══ 4.12. PsnsCopyFileFilter ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCopyFileFilter - Syntax ═══ /***************************************************/ /* This function creates a new file filter which */ /* is a copy of an existing file filter */ /***************************************************/ Call PsnsCopyFileFilter handle, "name", "newName" ═══ PsnsCopyFileFilter - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the existing file filter which you wish to copy. "newName" The name of the new file filter. ═══ PsnsCopyFileFilter - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_FILE_FILTER PSNS_ALREADY_EXISTS PSNS_INVALID_NAME REXX_INVALID_HANDLE ═══ PsnsCopyFileFilter - Remarks ═══ Use this function to create a new file filter which is a copy of an existing one. newName must not be the same as the name of any existing file filter. name and newName are in quotes to ensure that their cases are correct. ═══ PsnsCopyFileFilter - Related functions ═══  PsnsCreateFileFilter  PsnsDeleteFileFilter  PsnsFileFilterInfo  PsnsListFileFilters  PsnsRenameFileFilter ═══ 4.13. PsnsCopyRestoreMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCopyRestoreMethod - Syntax ═══ /****************************************************/ /* This function creates a new restore method which */ /* is a copy of an existing restore method */ /****************************************************/ Call PsnsCopyRestoreMethod handle, "name", "newName" ═══ PsnsCopyRestoreMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the existing restore method which you wish to copy. "newName" The name of the new restore method. ═══ PsnsCopyRestoreMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RESTORE_METHOD PSNS_ALREADY_EXISTS PSNS_INVALID_NAME REXX_INVALID_HANDLE ═══ PsnsCopyRestoreMethod - Remarks ═══ Use this function to create a new restore method which is a copy of an existing one. newName must not be the same as the name of any existing restore method. name and newName are in quotes to ensure that their cases are correct. ═══ PsnsCopyRestoreMethod - Related functions ═══  PsnsCreateRestoreMethod  PsnsDeleteRestoreMethod  PsnsEstimateRestoreMethod  PsnsListRestoreMethods  PsnsRenameRestoreMethod  PsnsRestoreMethodInfo  PsnsRunRestoreMethod ═══ 4.14. PsnsCopyRulebook ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCopyRulebook - Syntax ═══ /***************************************************/ /* This function creates a new rulebook which */ /* is a copy of an existing rulebook */ /***************************************************/ Call PsnsCopyRulebook handle, "name", "newName" ═══ PsnsCopyRulebook - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the existing rulebook which you wish to copy. "newName" The name of the new rulebook. ═══ PsnsCopyRulebook - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RULEBOOK PSNS_ALREADY_EXISTS PSNS_INVALID_NAME REXX_INVALID_HANDLE ═══ PsnsCopyRulebook - Remarks ═══ Use this function to create a new rulebook which is a copy of an existing one. newName must not be the same as the name of any existing rulebook. name and newName are in quotes to ensure that their cases are correct. ═══ PsnsCopyRulebook - Related functions ═══  PsnsCreateRulebook  PsnsDeleteRulebook  PsnsListRulebooks  PsnsRenameRulebook  PsnsRulebookInfo ═══ 4.15. PsnsCreateBackupMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCreateBackupMethod - Syntax ═══ /***************************************************/ /* This function creates a new backup method */ /***************************************************/ Call PsnsCreateBackupMethod handle, "name" ═══ PsnsCreateBackupMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the method to be created. ═══ PsnsCreateBackupMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_ALREADY_EXISTS PSNS_INVALID_NAME REXX_INVALID_HANDLE ═══ PsnsCreateBackupMethod - Remarks ═══ Use this function to create a new backup method. name must not be the name of any existing backup method. The backup method is created with default settings; you can use PsnsBackupMethodInfo to change these. name is in quotes to ensure that its case is correct. ═══ PsnsCreateBackupMethod - Related functions ═══  PsnsBackupMethodInfo  PsnsCopyBackupMethod  PsnsDeleteBackupMethod  PsnsEstimateBackupMethod  PsnsListBackupMethods  PsnsRenameBackupMethod  PsnsRunBackupMethod ═══ 4.16. PsnsCreateBackupSet ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCreateBackupSet - Syntax ═══ /***************************************************/ /* This function creates a new backup set */ /***************************************************/ Call PsnsCreateBackupSet handle, "setName", "storageDevice", "config", "incStorageDevice", "incConfig" ═══ PsnsCreateBackupSet - Parameters ═══ handle Handle returned by PsnsInit "setName" The name of the backup set to be created. "storageDevice" For a single device backup set, this is the storage device which the backup set will use for all backups, incStorageDevice and incConfig should not be set, that is PsnsCreateBackupSet should only be called with four arguments. For a dual device backup set this is the name of the storage device which this backup set will use for the base backup, you should also specify an incremental storage device. "config" Configuration string for the device; for more information see PsnsSetBackupSetConfig. For dual device backup sets this is the configuration string for the base storage device. "incStorageDevice" Name of the storage device which this dual device backup set will use for incremental backups. When creating single device backup sets, this argument is omitted. "incConfig" Configuration string for the incremental drive; for more information see PsnsSetBackupSetConfig. When creating single device backup sets, this argument is omitted. ═══ PsnsCreateBackupSet - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_ALREADY_EXISTS PSNS_INVALID_NAME PSNS_INVALID_STORAGE_DEVICE PSNS_CANNOT_CREATE_BACKUP_SET PSNS_INVALID_KEYWORD PSNS_INVALID_VALUE PSNS_SYNTAX_ERROR PSNS_INCOMPLETE_STRING PSNS_SEMANTIC_ERROR REXX_INVALID_HANDLE ═══ PsnsCreateBackupSet - Remarks ═══ Use this function to create a new backup set. name must not be the name of any existing backup set. The event is created with default settings; you can use PsnsBackupSetInfo to change these. When creating a normal, single storage device backup set the last two parameters should be omitted. When creating a dual storage device backup set specify all the parameters. setName, storageDevice, config, incStorageDevice, and incConfig are in quotes to ensure that their cases are correct. ═══ PsnsCreateBackupSet - Related functions ═══  PsnsBackupSetInfo  PsnsDeleteBackupSet  PsnsEmptyBackupSet  PsnsGetBackupSetConfig  PsnsGetLogFile  PsnsListBackupSets  PsnsSetBackupSetConfig  PsnsTransferBackupSet  PsnsTransferIn ═══ 4.17. PsnsCreateEvent ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCreateEvent - Syntax ═══ /***************************************************/ /* This function creates a new scheduled event */ /***************************************************/ Call PsnsCreateEvent handle, "eventInfoMask", "method" ═══ PsnsCreateEvent - Parameters ═══ handle Handle returned by PsnsInit "eventInfoMask" The type of event to be created. Possible types are: REGULAR A regular interval event. DAILY A daily event. STARTUP A startup event. NAMEDDAYS A named day event. MONTHLY A monthly event. "method" Name of the backup method which the event will use. This can be changed later, but must be specified when you first create an event. ═══ PsnsCreateEvent - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_EVENT_TYPE REXX_INVALID_HANDLE REXX_INVALID_MASK_NAME ═══ PsnsCreateEvent - Remarks ═══ Use this function to create a new scheduled event. The ID of the event is returned in a REXX variable eventID. The event is created with default settings; you can use PsnsEventInfo to change these. eventInfoMask and method are in quotes to ensure that their cases are correct. ═══ PsnsCreateEvent - Related functions ═══  PsnsActivateEvent  PsnsCopyEvent  PsnsDeleteEvent  PsnsEventInfo  PsnsGetNextEvent  PsnsListEvents ═══ 4.18. PsnsCreateFileFilter ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCreateFileFilter - Syntax ═══ /***************************************************/ /* This function creates a new file filter */ /***************************************************/ Call PsnsCreateFileFilter handle, "name", "type" ═══ PsnsCreateFileFilter - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the file filter to be created. "type" Type of file filter to create. TREE Tree-based filter. LIST Rule-based filter. Note: All file filters are stored as rule-based filters; the type only affects how the file filter is displayed when it is edited. ═══ PsnsCreateFileFilter - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_ALREADY_EXISTS PSNS_INVALID_NAME PSNS_INVALID_FILE_FILTER_TYPE REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsCreateFileFilter - Remarks ═══ Use this function to create a new file filter. name must not be the name of any existing file filter. The file filter is created with one rule which cannot be deleted and is referred to as the 'last' rule. You can use PsnsFileFilterInfo to change the file filter settings and PsnsAddFileFilterRule to add new rules to it. name and type are in quotes to ensure that their cases are correct. ═══ PsnsCreateFileFilter - Related functions ═══  PsnsAddFileFilterRule  PsnsCopyFileFilter  PsnsDeleteFileFilter  PsnsFileFilterInfo  PsnsListFileFilters  PsnsRenameFileFilter ═══ 4.19. PsnsCreateRestoreMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCreateRestoreMethod - Syntax ═══ /***************************************************/ /* This function creates a new restore method */ /***************************************************/ Call PsnsCreateRestoreMethod handle, "name" ═══ PsnsCreateRestoreMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the method to be created. ═══ PsnsCreateRestoreMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_ALREADY_EXISTS PSNS_INVALID_NAME REXX_INVALID_HANDLE ═══ PsnsCreateRestoreMethod - Remarks ═══ Use this function to create a new restore method. name must not be the name of any existing restore method. The restore method is created with default settings; you can use PsnsRestoreMethodInfo to change these. name is in quotes to ensure that its case is correct. ═══ PsnsCreateRestoreMethod - Related functions ═══  PsnsCopyRestoreMethod  PsnsDeleteRestoreMethod  PsnsEstimateRestoreMethod  PsnsListRestoreMethods  PsnsRenameRestoreMethod  PsnsRestoreMethodInfo  PsnsRunRestoreMethod ═══ 4.20. PsnsCreateRulebook ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCreateRulebook - Syntax ═══ /***************************************************/ /* This function creates a new rulebook */ /***************************************************/ Call PsnsCreateRulebook handle, "name" ═══ PsnsCreateRulebook - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the rulebook to be created. ═══ PsnsCreateRulebook - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_ALREADY_EXISTS PSNS_INVALID_NAME REXX_INVALID_HANDLE ═══ PsnsCreateRulebook - Remarks ═══ Use this function to create a new rulebook. name must not be the name of any existing rulebook. The rulebook is created with one rule which cannot be deleted and is referred to as the 'last' rule. You can use PsnsRulebookInfo to change the rulebook settings and PsnsAddRulebookRule to add new rules to it. name is in quotes to ensure that its case is correct. ═══ PsnsCreateRulebook - Related functions ═══  PsnsAddRulebookRule  PsnsCopyRulebook  PsnsDeleteRulebook  PsnsListRulebooks  PsnsRenameRulebook  PsnsRulebookInfo ═══ 4.21. PsnsCreateStorageDevice ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCreateStorageDevice - Syntax ═══ /***************************************************/ /* This function creates a new storage device */ /***************************************************/ Call PsnsCreateStorageDevice handle, "storageDeviceType", "configurationString" ═══ PsnsCreateStorageDevice - Parameters ═══ handle Handle returned by PsnsInit "storageDeviceType" The name of the storage device type you wish to create. To find out what to put here, you should use PsnsListCreatableStorageDevices; this will list all the storage device types available for creating new storage devices. "configurationString" Configuration string for the storage device; for more information see PsnsSetStorageDeviceConfig. ═══ PsnsCreateStorageDevice - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_STORAGE_DEVICE_TYPE PSNS_ALREADY_EXISTS PSNS_INVALID_NAME PSNS_INVALID_KEYWORD PSNS_INVALID_VALUE PSNS_SYNTAX_ERROR PSNS_INCOMPLETE_STRING PSNS_SEMANTIC_ERROR REXX_INVALID_HANDLE ═══ PsnsCreateStorageDevice - Remarks ═══ Use this function to create a new storage device. The name of the device created is placed in the REXX variable deviceName. You will need to specify what type of storage device is being created. To get a list of all the available storage device types for creating a new storage device, you should call PsnsListCreatableStorageDevices. The storage device is created with the default settings; to change them, use PsnsSetStorageDeviceConfig. storageDeviceType and configurationString are in quotes to ensure that their cases are correct. ═══ PsnsCreateStorageDevice - Related functions ═══  PsnsDeleteStorageDevice  PsnsGetStorageDeviceConfig  PsnsListCreatableStorageDevices  PsnsListStorageDevices  PsnsRefreshStorageDevices  PsnsSetStorageDeviceConfig  PsnsStorageDeviceInfo ═══ 4.22. PsnsCreateVolume ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsCreateVolume - Syntax ═══ /***************************************************/ /* This function creates a new volume */ /***************************************************/ Call PsnsCreateVolume handle, "storageDeviceName" ═══ PsnsCreateVolume - Parameters ═══ handle Handle returned by PsnsInit "storageDeviceName" The name of the storage device with which to create the volume. ═══ PsnsCreateVolume - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_STORAGE_DEVICE PSNS_INVALID_STORAGE_DEVICE_TYPE PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsCreateVolume - Remarks ═══ Use this function to create a new volume. The ID of the volume is placed in the REXX variable volumeID. The volume will not be associated with any backup set and will not be used until you have called PsnsAssociateVolume to associate it with a backup set. storageDeviceName is in quotes to ensure that its case is correct. ═══ PsnsCreateVolume - Related functions ═══  PsnsActivateVolume  PsnsAssociateVolume  PsnsDeleteVolume  PsnsListVolumeBackupSets  PsnsListVolumes  PsnsVolumeInfo ═══ 4.23. PsnsDefaultsInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDefaultsInfo - Syntax ═══ /***************************************************/ /* This function sets the default file filter, */ /* rulebook, backup set, compression and number of */ /* generations */ /***************************************************/ Call PsnsDefaultsInfo handle, "stemname" ═══ PsnsDefaultsInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem in which the information to be changed is put. Stemname parameters which may be used are: 0compression Permitted values are: 1 Do compress data by default. 0 Don't compress data by default. 0generations Default number of generations to keep backed up. 0rulebook Name of the default rulebook. 0fileFilter Name of the default file filter. 0backupSet Name of the default backup set. ═══ PsnsDefaultsInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_COMPRESSION PSNS_INVALID_GENERATIONS PSNS_INVALID_RULEBOOK PSNS_INVALID_FILE_FILTER REXX_INVALID_HANDLE ═══ PsnsDefaultsInfo - Remarks ═══ Use this function to change the default file filter, rulebook, backup set, compression and number of generations to be kept. Putting in a parameter means that it will be changed, from its old value. To look at the current defaults use PsnsListDefaults. stemname is in quotes to ensure that its case is correct. ═══ PsnsDefaultsInfo - Related functions ═══  PsnsListDefaults  PsnsListSettings  PsnsSettingsInfo ═══ 4.24. PsnsDeleteBackupMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteBackupMethod - Syntax ═══ /***************************************************/ /* This function deletes a backup method */ /***************************************************/ Call PsnsDeleteBackupMethod handle, "name" ═══ PsnsDeleteBackupMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the backup method to be deleted. ═══ PsnsDeleteBackupMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_METHOD REXX_INVALID_HANDLE ═══ PsnsDeleteBackupMethod - Remarks ═══ If the named backup method exists, it will be deleted. name is in quotes to ensure that its case is correct. ═══ PsnsDeleteBackupMethod - Related functions ═══  PsnsBackupMethodInfo  PsnsCopyBackupMethod  PsnsCreateBackupMethod  PsnsEstimateBackupMethod  PsnsListBackupMethods  PsnsRenameBackupMethod  PsnsRunBackupMethod ═══ 4.25. PsnsDeleteBackupSet ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteBackupSet - Syntax ═══ /***************************************************/ /* This function deletes a backup set */ /***************************************************/ Call PsnsDeleteBackupSet handle, "name" ═══ PsnsDeleteBackupSet - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the backup set to be deleted. ═══ PsnsDeleteBackupSet - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsDeleteBackupSet - Remarks ═══ If the named backup set exists, it will be deleted. You should take care not to delete a backup set which is referenced by any backup methods or restore methods; if you do, they will become invalid. name is in quotes to ensure that its case is correct. ═══ PsnsDeleteBackupSet - Related functions ═══  PsnsBackupSetInfo  PsnsCreateBackupSet  PsnsEmptyBackupSet  PsnsGetBackupSetConfig  PsnsGetLogFile  PsnsListBackupSets  PsnsSetBackupSetConfig  PsnsTransferBackupSet  PsnsTransferIn ═══ 4.26. PsnsDeleteEvent ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteEvent - Syntax ═══ /***************************************************/ /* This function deletes a scheduled event */ /***************************************************/ Call PsnsDeleteEvent handle, eventID ═══ PsnsDeleteEvent - Parameters ═══ handle Handle returned by PsnsInit eventID The ID of the event to be deleted. ═══ PsnsDeleteEvent - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_EVENT PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsDeleteEvent - Remarks ═══ If an event exists with the given ID, it will be deleted. ═══ PsnsDeleteEvent - Related functions ═══  PsnsActivateEvent  PsnsCopyEvent  PsnsCreateEvent  PsnsEventInfo  PsnsGetNextEvent  PsnsListEvents ═══ 4.27. PsnsDeleteFileFilter ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteFileFilter - Syntax ═══ /***************************************************/ /* This function deletes a file filter */ /***************************************************/ Call PsnsDeleteFileFilter handle, "name" ═══ PsnsDeleteFileFilter - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the file filter to be deleted. ═══ PsnsDeleteFileFilter - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_FILE_FILTER PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsDeleteFileFilter - Remarks ═══ If the named file filter exists, it will be deleted. You should take care not to delete a file filter which is referenced by any backup methods, if you do, then the backup methods will become invalid. name is in quotes to ensure that its case is correct. ═══ PsnsDeleteFileFilter - Related functions ═══  PsnsCopyFileFilter  PsnsCreateFileFilter  PsnsFileFilterInfo  PsnsListFileFilters  PsnsRenameFileFilter ═══ 4.28. PsnsDeleteFileFilterRule ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteFileFilterRule - Syntax ═══ /***************************************************/ /* This function deletes a rule from a file filter */ /***************************************************/ Call PsnsDeleteFileFilterRule handle, "name", position ═══ PsnsDeleteFileFilterRule - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the file filter from which a rule is to be deleted. position Number of the rule to be deleted (the first rule is 1). ═══ PsnsDeleteFileFilterRule - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_FILE_FILTER PSNS_INVALID_POSITION PSNS_IN_USE PSNS_READONLY REXX_INVALID_HANDLE ═══ PsnsDeleteFileFilterRule - Remarks ═══ Use this function to delete a rule from a file filter. name is in quotes to ensure that its case is correct. ═══ PsnsDeleteFileFilterRule - Related functions ═══  PsnsAddFileFilterRule  PsnsFileFilterRuleInfo  PsnsListFileFilterRule ═══ 4.29. PsnsDeleteRestoreMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteRestoreMethod - Syntax ═══ /***************************************************/ /* This function deletes a restore method */ /***************************************************/ Call PsnsDeleteRestoreMethod handle, "name" ═══ PsnsDeleteRestoreMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the method to be deleted. ═══ PsnsDeleteRestoreMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RESTORE_METHOD PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsDeleteRestoreMethod - Remarks ═══ If the named restore method exists, it will be deleted. name is in quotes to ensure that its case is correct. ═══ PsnsDeleteRestoreMethod - Related functions ═══  PsnsCopyRestoreMethod  PsnsCreateRestoreMethod  PsnsEstimateRestoreMethod  PsnsListRestoreMethods  PsnsRenameRestoreMethod  PsnsRestoreMethodInfo  PsnsRunRestoreMethod ═══ 4.30. PsnsDeleteRulebook ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteRulebook - Syntax ═══ /***************************************************/ /* This function deletes a rulebook */ /***************************************************/ Call PsnsDeleteRulebook handle, "name" ═══ PsnsDeleteRulebook - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the rulebook to be deleted. ═══ PsnsDeleteRulebook - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RULEBOOK PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsDeleteRulebook - Remarks ═══ If the named rulebook exists, it will be deleted. You should take care not to delete a rulebook which is referenced by any backup methods; if you do then the backup methods will become invalid. name is in quotes to ensure that its case is correct. ═══ PsnsDeleteRulebook - Related functions ═══  PsnsCopyRulebook  PsnsCreateRulebook  PsnsListRulebooks  PsnsRenameRulebook  PsnsRulebookInfo ═══ 4.31. PsnsDeleteRulebookRule ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteRulebookRule - Syntax ═══ /***************************************************/ /* This function deletes a rule from a rulebook */ /***************************************************/ Call PsnsDeleteRulebookRule handle, "name", position ═══ PsnsDeleteRulebookRule - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the rulebook from which a rule is to be deleted. position Number of the rule to be deleted (the first rule is 1). ═══ PsnsDeleteRulebookRule - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RULEBOOK PSNS_INVALID_POSITION PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsDeleteRulebookRule - Remarks ═══ Use this function to delete a rule from a rulebook. name is in quotes to ensure that its case is correct. ═══ PsnsDeleteRulebookRule - Related functions ═══  PsnsAddRulebookRule  PsnsListRulebookRule  PsnsRulebookRuleInfo ═══ 4.32. PsnsDeleteStorageDevice ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteStorageDevice - Syntax ═══ /***************************************************/ /* This function deletes a storage device */ /***************************************************/ Call PsnsDeleteStorageDevice handle, "storageDeviceName" ═══ PsnsDeleteStorageDevice - Parameters ═══ handle Handle returned by PsnsInit "storageDeviceName" The name of the storage device type you wish to delete. ═══ PsnsDeleteStorageDevice - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_STORAGE_DEVICE PSNS_IN_USE PSNS_CANNOT_DELETE REXX_INVALID_HANDLE ═══ PsnsDeleteStorageDevice - Remarks ═══ Use this function to delete a storage device. Some storage devices cannot be deleted; you also cannot delete a storage device which has any backup sets associated with it. storageDeviceName is in quotes to ensure that its case is correct. ═══ PsnsDeleteStorageDevice - Related functions ═══  PsnsCreateStorageDevice  PsnsGetStorageDeviceConfig  PsnsListCreatableStorageDevices  PsnsListStorageDevices  PsnsRefreshStorageDevices  PsnsSetStorageDeviceConfig  PsnsStorageDeviceInfo ═══ 4.33. PsnsDeleteVolume ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDeleteVolume - Syntax ═══ /***************************************************/ /* This function deletes a volume */ /***************************************************/ Call PsnsDeleteVolume handle, volumeID ═══ PsnsDeleteVolume - Parameters ═══ handle Handle returned by PsnsInit volumeID The ID of the volume to be deleted. ═══ PsnsDeleteVolume - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_VOLUME PSNS_IN_USE PSNS_CANNOT_DELETE PSNS_FIXED_VOLUME REXX_INVALID_HANDLE ═══ PsnsDeleteVolume - Remarks ═══ Use this function to delete a volume. Any data backed up to the volume will be lost. Fixed volumes (such as local fixed disks) cannot be deleted. ═══ PsnsDeleteVolume - Related functions ═══  PsnsActivateVolume  PsnsAssociateVolume  PsnsCreateVolume  PsnsListVolumeBackupSets  PsnsListVolumes  PsnsVolumeInfo ═══ 4.34. PsnsDropFiles ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsDropFiles - Syntax ═══ /***************************************************/ /* This function removes backed-up data for a list */ /* of files from a backup set. */ /***************************************************/ Call PsnsDropFiles handle, "backupsetName" ═══ PsnsDropFiles - Parameters ═══ handle Handle returned by PsnsInit "backupsetName" The name of the backup set from which you wish to drop file(s). ═══ PsnsDropFiles - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_FILE_NOT_FOUND PSNS_ARCHIVE_ERROR PSNS_TRANSFERRED_OUT REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsDropFiles - Remarks ═══ Use this function to remove information about a list of files from a backup set. After this, you will no longer be able to restore the generation(s) of the file(s) you have dropped. OS/2 Warp Server Backup/Restore will be able to reuse the space on the volume(s) taken up by these files. Before calling this function, you should list the files and generations you want to drop by calling PsnsAddFile. backupsetName is in quotes to ensure that its case is correct. ═══ PsnsDropFiles - Related functions ═══  PsnsAddFile  PsnsBackupFiles  PsnsListFiles  PsnsPurgeFiles  PsnsRestoreFiles ═══ 4.35. PsnsEmptyBackupSet ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsEmptyBackupSet - Syntax ═══ /***************************************************/ /* This function destroys all backed-up data in a */ /* backup set. */ /***************************************************/ Call PsnsEmptyBackupSet handle, "name" ═══ PsnsEmptyBackupSet - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the backup set to be emptied. ═══ PsnsEmptyBackupSet - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_IN_USE PSNS_ARCHIVE_ERROR PSNS_TRANSFERRED_OUT REXX_INVALID_HANDLE ═══ PsnsEmptyBackupSet - Remarks ═══ Use this function to destroy all backed-up data in a backup set. You will no longer be able to restore any of the files backed up to this backup set and OS/2 Warp Server Backup/Restore will be able to reuse the volumes which the backup set uses. The backup set itself is not deleted. name is in quotes to ensure that its case is correct. ═══ PsnsEmptyBackupSet - Related functions ═══  PsnsBackupSetInfo  PsnsCreateBackupSet  PsnsDeleteBackupSet  PsnsGetBackupSetConfig  PsnsGetLogFile  PsnsListBackupSets  PsnsSetBackupSetConfig  PsnsTransferBackupSet  PsnsTransferIn ═══ 4.36. PsnsEstimateBackupMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsEstimateBackupMethod - Syntax ═══ /*****************************************************/ /* This function counts the files and folders which */ /* would be backed up by a given backup method and */ /* calculates the estimated time for the backup. */ /*****************************************************/ Call PsnsEstimateBackupMethod handle, "backupName", "stemname" ═══ PsnsEstimateBackupMethod - Parameters ═══ handle Handle returned by PsnsInit "backupName" The name of the backup to be estimated. "stemname" The name of the stem in which the information is to be put. The returned stemname values are: 0files The number of files. 0folders The number of folders. 0bytes The amount of bytes to be backed up. 0time Estimated length of time, in seconds, for the backup to take place. ═══ PsnsEstimateBackupMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_METHOD REXX_INVALID_HANDLE ═══ PsnsEstimateBackupMethod - Remarks ═══ Use this function to scan for files and folders which would be backed up by a backup method, and estimate how long the backup would take. OS/2 Warp Server Backup/Restore calculates the estimated time based on past backups to the same storage device. The information is returned in terms of compound variables, taking the stemname specified, and a tail added by the program. The compound variables are listed in the parameters section. The maximum size of backup that the estimate structure can deal with is 4.2 Gigabytes. backupName and stemname are in quotes to ensure that their cases are correct. ═══ PsnsEstimateBackupMethod - Related functions ═══  PsnsRunBackupMethod ═══ 4.37. PsnsEstimateRestoreMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsEstimateRestoreMethod - Syntax ═══ /*****************************************************/ /* This function counts the files and folders which */ /* would be restored by a given restore method. */ /*****************************************************/ Call PsnsEstimateRestoreMethod handle, "restoreName", "stemname" ═══ PsnsEstimateRestoreMethod - Parameters ═══ handle Handle returned by PsnsInit "restoreName" The name of the restore method to be estimated. "stemname" The name of the stem in which the information is to be put. The returned stemname values are: 0files The number of files. 0folders The number of folders. 0bytes The amount of bytes to be restored. ═══ PsnsEstimateRestoreMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RESTORE_METHOD PSNS_ARCHIVE_ERROR REXX_INVALID_HANDLE ═══ PsnsEstimateRestoreMethod - Remarks ═══ Use this function to scan for files and folders which would be restored by a restore method, and estimate how long the restore would take. OS/2 Warp Server Backup/Restore calculates the estimated time based on past restores from the same storage device. The information is returned in terms of compound variables, taking the stemname specified, and a tail added by the program. The compound variables are listed in the parameters section. The maximum size of restore that the estimate structure can deal with is 4.2 Gigabytes. restoreName and stemname are in quotes to ensure that their cases are correct. ═══ PsnsEstimateRestoreMethod - Related functions ═══  PsnsRunRestoreMethod ═══ 4.38. PsnsEventInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsEventInfo - Syntax ═══ /***************************************************/ /* This function gets or sets all the information */ /* about a scheduled event */ /***************************************************/ Call PsnsEventInfo handle, "stemname", eventID ═══ PsnsEventInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may have their values changed or filled in by the API are: 0hours The hour of the day when the event takes place. This parameter is used for all event types. 0minutes The minute of the hour when the event takes place. This parameter is used for all event types. Note: For STARTUP events these parameters give the lapsed time in hours and minutes after startup when the event is to happen. 0days Bit-field specifying on which days the event will occur: 1 = Monday, 2 = Tuesday, 4 = Wednesday and so on. This parameter is needed for NAMEDDAYS events. 0weeks Bit-field specifying in which weeks of the month the event will occur: 1 = First week, 2 = second, 4 = third, 8 = fourth, 16 = last. This parameter is needed for NAMEDDAYS events. 0day The day of the month on which the event takes place. This parameter is needed for MONTHLY events. 0backupMethod Name of the backup method which will be run. 0changedFilesOnly Permitted values are: YES Only back up files which have changed since the last backup. NO Back up all files, whether they have changed or not. AS_METHOD Use the backup method to decide whether to back up changed files. 0showPreview Permitted values are: YES Show a preview before performing the backup. NO Do not show a preview. AS_METHOD Use the backup method to decide whether to show a preview. 0active Permitted values are: 1 The event is active. 0 The event is inactive and will not occur. eventID The ID of the event to be changed. ═══ PsnsEventInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_EVENT PSNS_IN_USE PSNS_INVALID_BACKUP_METHOD PSNS_INVALID_MASK PSNS_INVALID_TIME REXX_INVALID_HANDLE REXX_INVALID_MASK_NAME ═══ PsnsEventInfo - Remarks ═══ Use this function to change an event or inspect the current settings for it. In order to look at the settings, without changing any, simply do not create any compound variables, the API then fills in all the compound variables, so as to show the current settings. Putting in a parameter means that it will be changed, from its old value. It is not possible to change the type of an event with this call; to do that, the event must be deleted, and a new one created. For events of the STARTUP type, the time fields relate to how long after starting up the machine, the event takes place. stemname is in quotes to ensure that its case is correct. ═══ PsnsEventInfo - Related functions ═══  PsnsActivateEvent  PsnsCopyEvent  PsnsCreateEvent  PsnsDeleteEvent  PsnsGetNextEvent  PsnsListEvents ═══ 4.39. PsnsFileFilterInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsFileFilterInfo - Syntax ═══ /***************************************************/ /* This function gets or sets all the information */ /* about a file filter */ /***************************************************/ Call PsnsFileFilterInfo handle, "stemname" ═══ PsnsFileFilterInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may have their values changed or filled in by the API are: 0name The name of the file filter. 0description Description of the file filter. 0type Permitted values are: TREE Tree-based filter. LIST Rule-based filter. Note: All file filters are stored as rule-based filters; the type only affects how the file filter is displayed when it is edited. 0searchfile This field is used when listing file filters; it specifies a filename to match. All the file filters which select this file will be listed. ═══ PsnsFileFilterInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_FILE_FILTER PSNS_IN_USE PSNS_INVALID_FILE_FILTER_TYPE PSNS_INVALID_MASK REXX_INVALID_HANDLE REXX_INVALID_MASK_NAME ═══ PsnsFileFilterInfo - Remarks ═══ Use this function to change a file filter or to inspect the current settings for a file filter. In order to look at the settings, without changing any, do not create any compound variables, except that of the file filter name, the API then fills in all the compound variables, so as to show the current settings. Putting in a parameter means that it will be changed, from its old value. This, however is not true for the name field. It is not possible to change the name of a file filter with this call; to do that, use PsnsRenameFileFilter. stemname is in quotes to ensure that its case is correct. ═══ PsnsFileFilterInfo - Related functions ═══  PsnsCopyFileFilter  PsnsCreateFileFilter  PsnsDeleteFileFilter  PsnsListFileFilters  PsnsRenameFileFilter ═══ 4.40. PsnsFileFilterRuleInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsFileFilterRuleInfo - Syntax ═══ /***************************************************/ /* This function gets or sets all the information */ /* about a rule in a file filter */ /***************************************************/ Call PsnsFileFilterRuleInfo handle, "stemname", position, "fileFilterName" ═══ PsnsFileFilterRuleInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may have their values changed or filled in by the API are: 0drive Drive letter to be included / excluded, or an asterisk (*) for all drives. 0directory Directory to be included / excluded. 0pattern Wildcard specifying which files to be included / excluded. 0subdirectories Permitted values are: 1 Also include / exclude subdirectories in the specified directory. 0 Do not include / exclude subdirectories. 0include Permitted values are: 1 Include the specified files. 0 Exclude the specified files. position Number of the rule to be inspected or changed (the first rule is 1). "fileFilterName" Name of the file filter to be inspected or changed. ═══ PsnsFileFilterRuleInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_FILE_FILTER PSNS_IN_USE PSNS_INVALID_POSITION PSNS_INVALID_DRIVE PSNS_INVALID_PATH PSNS_INVALID_FILENAME PSNS_READONLY PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsFileFilterRuleInfo - Remarks ═══ Use this function to change a file filter rule or to inspect the current settings of a file filter rule. In order to look at the settings, without changing any, do not create any compound variables, the API then fills in all the compound variables, so as to show the current settings. Putting in a parameter means that it will be changed, from its old value. stemname and fileFilterName are in quotes to ensure their cases are correct. ═══ PsnsFileFilterRuleInfo - Related functions ═══  PsnsAddFileFilterRule  PsnsDeleteFileFilterRule  PsnsListFileFilterRule ═══ 4.41. PsnsGetBackupSetConfig ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsGetBackupSetConfig - Syntax ═══ /****************************************************/ /* This function gets configuration information for */ /* a backup set */ /****************************************************/ Call PsnsGetBackupSetConfig handle, "stemname" ═══ PsnsGetBackupSetConfig - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and put into. Stemname parameters used are: 0name The name of the backup set for which configuration information is to be obtained. The backup set name must be specified with this input parameter. 0confString This parameter will return the configuration string of the named backup set. For dual device backup sets this is the configuration string for the base storage device. 0incConfString For dual device backup sets, this parameter returns the configuration information for the incremental storage device. If the backup set is a single device backup set, then this parameter is set to a zero length string. ═══ PsnsGetBackupSetConfig - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_TOO_MUCH_DATA PSNS_TRANSFERRED_OUT REXX_INVALID_HANDLE ═══ PsnsGetBackupSetConfig - Remarks ═══ Use this function to get the current configuration information for a backup set, which is returned in stemname.0confString. The format of this information depends on the storage device which the backup set uses; to find out how all the standard OS/2 Warp Server Backup/Restore storage devices handle this, see Storage Device Configuration. stemname is in quotes to ensure that its case is correct. ═══ PsnsGetBackupSetConfig - Related functions ═══  PsnsGetBackupSetConfig  PsnsSetBackupSetConfig  PsnsSetStorageDeviceConfig  PsnsTransferIn ═══ 4.42. PsnsGetLogFile ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsGetLogFile - Syntax ═══ /****************************************************/ /* This function returns the name of the log file */ /* for a backup set */ /****************************************************/ Call PsnsGetLogFile handle, "stemname" ═══ PsnsGetLogFile - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and put into. Parameters used are: 0name The name of the backup set for which the log file is to be obtained. The backup set name must be specified with this input parameter. 0logFile This parameter returns the name of the requested log file. ═══ PsnsGetLogFile - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET REXX_INVALID_HANDLE ═══ PsnsGetLogFile - Remarks ═══ Use this function to get the name of the log file for a backup set, this is returned in stemname.0logFile. If OS/2 Warp Server Backup/Restore is running locally, you will then be able to view, edit or delete the log file. stemname is in quotes to ensure that its case is correct. ═══ PsnsGetLogFile - Related functions ═══  PsnsRunBackupMethod  PsnsRunRestoreMethod  PsnsTransferIn ═══ 4.43. PsnsGetMessageText ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsGetMessageText - Syntax ═══ /***************************************************/ /* This function returns a text message associated */ /* with an API return code. */ /***************************************************/ Call PsnsGetMessageText handle, "returnVariable", returnCode ═══ PsnsGetMessageText - Parameters ═══ handle Handle returned by PsnsInit "returnVariable" The REXX variable into which the text message is to be put. returnCode Return code for which you want to get a message ═══ PsnsGetMessageText - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RC PSNS_TOO_MUCH_DATA REXX_INVALID_HANDLE ═══ PsnsGetMessageText - Remarks ═══ Use this function to retieve a message which contains a textual description of an OS/2 Warp Server Backup/Restore API return code. The text message is returned in the REXX variable returnVariable specified by the user. returnVariable is in quotes to ensure that its case is correct. ═══ PsnsGetMessageText - Related functions ═══ There are no related functions. ═══ 4.44. PsnsGetNextEvent ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsGetNextEvent - Syntax ═══ /***************************************************/ /* This function calculates which scheduled event */ /* is due to happen next, and returns information */ /* about it. */ /***************************************************/ Call PsnsGetNextEvent handle ═══ PsnsGetNextEvent - Parameters ═══ handle Handle returned by PsnsInit ═══ PsnsGetNextEvent - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_NO_EVENTS REXX_INVALID_HANDLE ═══ PsnsGetNextEvent - Remarks ═══ Use this function to find out which scheduled event is due to happen next. It is possible that no events are currently scheduled to happen; in that case, PSNS_NO_EVENTS will be returned. The id of the next event to happen is returned in the REXX variable nextEventID. ═══ PsnsGetNextEvent - Related functions ═══  PsnsActivateEvent  PsnsCopyEvent  PsnsCreateEvent  PsnsDeleteEvent  PsnsEventInfo  PsnsListEvents ═══ 4.45. PsnsGetStorageDeviceConfig ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsGetStorageDeviceConfig - Syntax ═══ /****************************************************/ /* This function gets configuration information for */ /* a storage device */ /****************************************************/ Call PsnsGetStorageDeviceConfig handle, "stemname" ═══ PsnsGetStorageDeviceConfig - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and put into. 0storageDevice The name of the storage device for which configuration information is to be obtained. The storage device name must be specified with this input parameter. 0confString This parameter will return the configuration string of the named storage device. ═══ PsnsGetStorageDeviceConfig - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_STORAGE_DEVICE PSNS_TOO_MUCH_DATA REXX_INVALID_HANDLE ═══ PsnsGetStorageDeviceConfig - Remarks ═══ Use this function to get the current configuration information for a storage device, which is returned in stemname.0confString. The format of this information depends on the storage device; to find out how all the standard OS/2 Warp Server Backup/Restore storage devices handle this, see Storage Device Configuration. stemname is in quotes to ensure that its case is correct. ═══ PsnsGetStorageDeviceConfig - Related functions ═══  PsnsGetBackupSetConfig  PsnsSetBackupSetConfig  PsnsSetStorageDeviceConfig ═══ 4.46. PsnsInit ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsInit - Syntax ═══ /***************************************************/ /* This function opens a connection to the API */ /* server for use with subsequent API functions. */ /***************************************************/ Call PsnsInit "handleName", "type", "data1", "data2" ═══ PsnsInit - Parameters ═══ "handleName" The name of the REXX variable into which the handle number is to be put. "type" Permitted values are: "PIPE" Connect using named pipes. "TCPIP" Connect using TCP/IP sockets "data1" and "data2" Data about the connection. To use named pipes, "data1" should contain the name of the server to connect to, and "data2" should contain the name of the pipe to connect to on that server. If "data1" is empty, a local server is used, while if "data2" is empty, a default pipe is used. To use TCP/IP, "data1" should contain a string of the form "hostname:port" or "hostname:service", specifying either a port number or a service to be looked up in the TCP/IP services file; if "data1" is empty or NULL, the port will be decided by looking up psnsapi in the TCP/IP services file. ═══ PsnsInit - Returns ═══ PSNS_OK PSNS_COMMUNICATIONS_ERROR PSNS_CANNOT_CONNECT PSNS_NO_MORE_HANDLES REXX_INVALID_HANDLE ═══ PsnsInit - Remarks ═══ This function must be called before using any other OS/2 Warp Server Backup/Restore functions. It opens a connection to the API server, which can be either local or remote. Only one API function can be called at a time. After all the API calls have been made, call PsnsTerm The handle number is returned in the REXX variable specified in handleName. handleName, type, data1 and data2 are in quotes to ensure that their cases are correct. ═══ PsnsInit - Related functions ═══  PsnsTerm ═══ 4.47. PsnsListBackupMethods ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListBackupMethods - Syntax ═══ /***************************************************/ /* This function lists all the backup methods and */ /* their current settings */ /***************************************************/ Call PsnsListBackupMethods handle, "stemname" ═══ PsnsListBackupMethods - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0name The name of the backup method. n.0description The description of the backup method. n.0allFiles Possible values are: 1 Allow backup of any file; the drive, directory and subdirectories fields are ignored. 0 Allow backup of files specified by the drive, directory and subdirectories fields. n.0drive Drive letter from which to back up files. An asterisk (*) means all drives. n.0directory The directory from which to back up files. n.0subdirectories Possible values are: 1 Include subdirectories of the specified directory. 0 Do not include subdirectories. n.0compression Possible values are: NOCOMPRESSION Files are not compressed. COMPRESSION Files are compressed. DEFAULT Files are compressed using default compression. n.0generations Number of generations of files to keep backed up. n.0useRulebook Possible values are: 1 The rulebook named in rulebook is used. The compression and generations fields are ignored. 0 A rulebook is not used. The settings in compression and generations are used. The rulebook field is ignored. n.0rulebook The name of the rulebook used. n.0useFileFilter Possible values are: 1 The file filter named in fileFilter is used to decide which files to back up. 0 All the files in the selected directory are backed up. fileFilter is ignored. n.0fileFilter The name of the file filter used. n.0changedFilesOnly Possible values are: 1 Only files which have changed since the last backup to this backup set are backed up. 0 All files are backed up, regardless of whether they have changed. n.0preview Possible values are: 1 A preview is shown before the backup which allows the user to select or deselect individual files. 0 A preview is not shown before the backup. Note: Showing a preview is only useful if the backup method is to be run from the OS/2 Warp Server Backup/Restore window; it is not possible to show a preview when running a backup method using the API. n.0backupSet The backup set to which data is backed up. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListBackupMethods - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsListBackupMethods - Remarks ═══ Use this function to list all the backup methods. The information is returned in the form of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListBackupMethods - Related functions ═══  PsnsBackupMethodInfo  PsnsCopyBackupMethod  PsnsCreateBackupMethod  PsnsDeleteBackupMethod  PsnsEstimateBackupMethod  PsnsRenameBackupMethod  PsnsRunBackupMethod ═══ 4.48. PsnsListBackupSets ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListBackupSets - Syntax ═══ /***************************************************/ /* This function lists all the backup sets and */ /* their current settings */ /***************************************************/ Call PsnsListBackupSets handle, "stemname" ═══ PsnsListBackupSets - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0name The name of the backup set. n.0description The description of the backup set. n.0storageDevice The storage device which the backup set uses. For dual device backup sets this is the base device. n.0incStorageDevice For single device backup sets this is a zero length string. For dual device backup sets this is the device which incremental backups are written to. Note that once a backup set has been created it cannot be changed from a single device backup set to a dual device backup set or vice-versa. n.0transferredIn Possible values are: 1 The backup set is transferred in and available for use. 0 Otherwise. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListBackupSets - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsListBackupSets - Remarks ═══ Use this function to list all the backup sets. The information is returned in the form of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListBackupSets - Related functions ═══  PsnsBackupSetInfo  PsnsCreateBackupSet  PsnsDeleteBackupSet  PsnsEmptyBackupSet  PsnsGetBackupSetConfig  PsnsGetLogFile  PsnsSetBackupSetConfig  PsnsTransferBackupSet  PsnsTransferIn ═══ 4.49. PsnsListCreatableStorageDevices ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListCreatableStorageDevices - Syntax ═══ /****************************************************/ /* This function lists all the creatable storage */ /* device types */ /****************************************************/ Call PsnsListCreatableStorageDevices handle, "stemname" ═══ PsnsListCreatableStorageDevices - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0name The name of the storage device. n.0dllName The name of the Dynamic Link Library (DLL) which implements the storage device. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListCreatableStorageDevices - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsListCreatableStorageDevices - Remarks ═══ Use this function to list all the creatable storage devices. The information is returned in the form of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListCreatableStorageDevices - Related functions ═══  PsnsCreateStorageDevice  PsnsDeleteStorageDevice  PsnsGetStorageDeviceConfig  PsnsListStorageDevices  PsnsRefreshStorageDevices  PsnsSetStorageDeviceConfig  PsnsStorageDeviceInfo ═══ 4.50. PsnsListDefaults ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListDefaults - Syntax ═══ /***************************************************/ /* This function lists the default file filter, */ /* rulebook, backup set, compression and number of */ /* generations */ /***************************************************/ Call PsnsListDefaults handle, "stemname" ═══ PsnsListDefaults - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. Parameter values returned are: 0compression Possible values are: 1 Do compress data by default. 0 Do not compress data by default. 0generations Default number of generations to keep backed up. 0rulebook The name of the default rulebook. 0fileFilter The name of the default file filter. 0backupSet The name of the default backup set. ═══ PsnsListDefaults - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_COMPRESSION PSNS_INVALID_GENERATIONS PSNS_INVALID_RULEBOOK PSNS_INVALID_FILE_FILTER REXX_INVALID_HANDLE ═══ PsnsListDefaults - Remarks ═══ Use this function to inspect the default file filter, rulebook, backup set, compression and number of generations to be kept. The information is returned in the form of compound variables, taking the stemname specified, and a tail added by the program. The compound variables are listed in the parameters section. To change the defaults, use PsnsListDefaultsInfo. stemname is in quotes to ensure that its case is correct. ═══ PsnsListDefaults - Related functions ═══  PsnsDefaultsInfo  PsnsListSettings  PsnsSettingsInfo ═══ 4.51. PsnsListEvents ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListEvents - Syntax ═══ /***************************************************/ /* This function lists scheduled events */ /***************************************************/ Call PsnsListEvents handle, "stemname" ═══ PsnsListEvents - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0id The ID of the event. n.0type The type of event created. Possible values are: REGULAR A regular interval event. DAILY A daily event. STARTUP A startup event. NAMEDDAYS A named day event. MONTHLY A monthly event. n.0hours The hour of the day when the event takes place. This parameter is used for all event types. n.0minutes The minute of the hour when the event takes place. This parameter is used for all event types. Note: For STARTUP events these parameters give the lapsed time in hours and minutes after startup when the event is to happen. n.0days Bit-field specifying on which days the event will occur: 1 = Monday, 2 = Tuesday, 4 = Wednesday and so on. This parameter is used for NAMEDDAYS events. n.0weeks Bit-field specifying in which weeks of the month the event will occur: 1 = First week, 2 = second, 4 = third, 8 = fourth, 16 = last. This parameter is used for NAMEDDAYS events. n.0day The day of the month on which the event takes place. This parameter is used for MONTHLY events. n.0backupMethod The name of the backup method which is run. n.0changedFilesOnly Possible values are: YES Only files which have changed since the last backup are backed up. NO All files are backed up, regardless of their changed status. AS_METHOD The backup method is used to decide whether to back up changed files. n.0showPreview Possible values are: YES A preview is shown before performing the backup. NO A preview is not shown. AS_METHOD The backup method is used to decide whether or not to show a preview. n.0active Possible values are: 1 The event is active. 0 The event is inactive and will not occur. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListEvents - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsListEvents - Remarks ═══ Use this function to view the events. The information is returned in the form of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListEvents - Related functions ═══  PsnsActivateEvent  PsnsCopyEvent  PsnsCreateEvent  PsnsDeleteEvent  PsnsEventInfo  PsnsGetNextEvent ═══ 4.52. PsnsListFileFilterRule ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListFileFilterRule - Syntax ═══ /****************************************************/ /* This function lists the settings for a given */ /* file filter rule. */ /****************************************************/ Call PsnsListFileFilterRule handle, "stemname", position, "fileFilterName" ═══ PsnsListFileFilterRule - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. Parameter values returned are: 0drive The drive letter included / excluded. An asterisk (*) means all drives. 0directory The directory included / excluded. 0pattern Wildcard specifying which files to include / exclude. 0subdirectories Possible values are: 1 Also include / exclude subdirectories in the specified directory. 0 Do not include / exclude subdirectories. 0include Possible values are: 1 Include the specified files. 0 Exclude the specified files. position Number of the rule to be inspected (the first rule is 1). "fileFilterName" Name of the file filter to be inspected. ═══ PsnsListFileFilterRule - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_FILE_FILTER PSNS_IN_USE PSNS_INVALID_POSITION PSNS_INVALID_DRIVE PSNS_INVALID_PATH PSNS_INVALID_FILENAME PSNS_READONLY PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsListFileFilterRule - Remarks ═══ Use this function to list the settings for a particular rule within a file filter. The information is returned in the form of compound variables, taking the stemname specified, and a tail added by the program. The compound variables are listed in the parameters section. In order to see how many rules a particular file filter has, use the function PsnsFileFilterInfo. stemname and fileFilterName are in quotes to ensure that their cases are correct. ═══ PsnsListFileFilterRule - Related functions ═══  PsnsAddFileFilterRule  PsnsDeleteFileFilterRule  PsnsFileFilterRuleInfo ═══ 4.53. PsnsListFileFilters ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListFileFilters - Syntax ═══ /***************************************************/ /* This function lists all the file filters and */ /* their current settings */ /***************************************************/ Call PsnsListFileFilters handle, "stemname", "filename" ═══ PsnsListFileFilters - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0name The name of the file filter. n.0description The description of the file filter. n.0type Possible values are: TREE Tree-based filter. LIST Rule-based filter. Note: All the file filters are stored as rule-based filters; the type only affects how the file filter is displayed when it is edited. n.0numRules The number of rules in the file filter. "filename" This parameter is optional. If used, the filename must be fully qualified; only details of those file filters which would select this file are listed. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListFileFilters - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsListFileFilters - Remarks ═══ Use this function to list all the file filters. The information is returned in the form of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname and filename are in quotes to ensure that their cases are correct. ═══ PsnsListFileFilters - Related functions ═══  PsnsCopyFileFilter  PsnsCreateFileFilter  PsnsDeleteFileFilter  PsnsFileFilterInfo  PsnsRenameFileFilter ═══ 4.54. PsnsListFiles ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListFiles - Syntax ═══ /****************************************************/ /* This function gives the user the list of files */ /* created by calls to PsnsAddFile. */ /****************************************************/ Call PsnsListFiles handle, "stemname" ═══ PsnsListFiles - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0backupSet The name of the backup set to which this file is backed up. n.0filename The original name and path of the file. n.0generations The number of generations of this file which are backed up to this backup set. n.0thisGeneration The number of the generation to which the information in this structure refers. n.0creationDay The day when the file was created. n.0creationMonth The month when the file was created. n.0creationYear The year when the file was created. n.0creationHours The hour of the day when the file was created. n.0creationMins The minute in the hour when the file was created. n.0creationSecs The second in the minute when the file was created. n.0writeDay The day when the backed-up file was last changed. n.0writeMonth The month when the backed-up file was last changed. n.0writeYear The year when the backed-up file was last changed. n.0writeHours The hour of the day when the backed-up file was last changed. n.0writeMins The minute in the hour when the backed-up file was last changed. n.0writeSecs The second in the minute when the backed-up file was last changed. n.0backupDay The day when this generation was backed up. n.0backupMonth The month when this generation was backed up. n.0backupYear The year when this generation was backed up. n.0backupHours The hour of the day when this generation was backed up. n.0backupMins The minute in the hour when this generation was backed up. n.0backupSecs The second in the minute when this generation was backed up. n.0size The size of the file. n.0attribs The file attributes in the form returned by DosQueryFileInfo. n.0volumeID The ID of the volume on which this generation is stored. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListFiles - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK PSNS_INVALID_BACKUP_SET PSNS_ARCHIVE_ERROR PSNS_TRANSFERRED_OUT REXX_INVALID_HANDLE ═══ PsnsListFiles - Remarks ═══ Use this function to list files which have been backed up to a backup set. The information is returned in the form of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListFiles - Related functions ═══  PsnsAddFile  PsnsBackupFiles  PsnsDropFiles  PsnsPurgeFiles  PsnsRestoreFiles ═══ 4.55. PsnsListRestoreMethods ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListRestoreMethods - Syntax ═══ /***************************************************/ /* This function lists all the restore methods and */ /* their current settings */ /***************************************************/ Call PsnsListRestoreMethods handle, "stemname" ═══ PsnsListRestoreMethods - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0name The name of the restore method. n.0description The description of the restore method n.0backupSet This can be any one of the following: The name of the backup set from which the restore is to be made An asterisk (*) to restore from all backup sets A zero length string (defined by two consecutive single or double quotation marks) to restore from the default backup set. n.0allFiles Possible values are: 1 Restore all files in the backup set; the drive, directory and subdirectories fields are ignored. 0 Allow the backup of files specified by the drive, directory and subdirectories fields. n.0drive Original drive of the files to be restored. n.0directory Original directory of the files to be restored. n.0pattern Wildcard selecting which files are to be restored. n.0subdirectories Possible values are: 1 Restore files in subdirectories of the selected directories. 0 Do not restore files in subdirectories. n.0byDate Possible values are: 1 Restore files as they were on the date specified in date and time. 0 Restore the most recent generation of each file. n.0date Files will be restored to the state they were in on this date if byDate is set to 1. n.0time Files will be restored to the state they were in at this time if byDate is set to 1. n.0preview Possible values are: 1 A preview is shown before the restore which allows the user to select or deselect individual files. 0 A preview is not shown before the restore. Note: Showing a preview is only useful if the restore method is to be run from the OS/2 Warp Server Backup/Restore window; it is not possible to show a preview when running a restore method using the API. n.0prompt 1 The user is prompted to select a generation of each file to be restored. 0 The user is not prompted; the most recent generation of each file is restored. Note: This is only useful if the restore method is to be run from the OS/2 Warp Server Backup/Restore window; it is not possible to pick generations when running a restore method using the API. n.0originalLocation Possible values are: 1 Restore files to their original locations; destinationDrive and destinationPath are ignored. 0 Restore files to the drive and path specified in destinationDrive and destinationPath. n.0destinationDrive Drive to which to restore files if originalLocation is set to 0. n.0destinationPath Path to which to restore files if originalLocation is set to 0. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListRestoreMethods - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsListRestoreMethods - Remarks ═══ Use this function to list all the restore methods. The information is returned in terms of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListRestoreMethods - Related functions ═══  PsnsCopyRestoreMethod  PsnsCreateRestoreMethod  PsnsDeleteRestoreMethod  PsnsEstimateRestoreMethod  PsnsRenameRestoreMethod  PsnsRestoreMethodInfo  PsnsRunRestoreMethod ═══ 4.56. PsnsListRulebookRule ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListRulebookRule - Syntax ═══ /****************************************************/ /* This function lists the settings for a given */ /* file filter rule. */ /****************************************************/ Call PsnsListRulebookRule handle, "stemname", position, "rulebookName" ═══ PsnsListRulebookRule - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. Parameter values returned are: 0drive The drive letter included / excluded. An asterisk (*) means all drives. 0directory The directory included / excluded. 0pattern Wildcard specifying which files to be included / excluded. 0subdirectories Possible values are: 1 Also include / exclude subdirectories in the specified directory. 0 Do not include / exclude subdirectories. 0generations Number of generations to keep of specified files. 0compression Possible values are: NOCOMPRESSION Compress the specified files. COMPRESSION Do not compress the specified files. DEFAULT Use the default compression for the specified files. "rulebookName" Name of the rulebook to which the rule is to be added. position This specifies the position where the rule is to be added to the file filter; 1 means add at the beginning, 2 after the first rule and so on. ═══ PsnsListRulebookRule - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RULEBOOK PSNS_IN_USE PSNS_INVALID_POSITION PSNS_INVALID_DRIVE PSNS_INVALID_PATH PSNS_INVALID_FILENAME PSNS_INVALID_COMPRESSION PSNS_INVALID_GENERATIONS PSNS_READONLY PSNS_INVALID_MASK REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsListRulebookRule - Remarks ═══ Use this function to list the settings for a particular rule within a rulebook. The information is returned in terms of compound variables, taking the stemname specified, and a tail added by the program. The compound variables are listed in the parameters section. In order to see how many rules a particular rulebook has, use the function PsnsRulebookInfo. stemname and rulebookName are in quotes to ensure that their cases are correct. ═══ PsnsListRulebookRule - Related functions ═══  PsnsAddRulebookRule  PsnsDeleteRulebookRule  PsnsRulebookRuleInfo ═══ 4.57. PsnsListRulebooks ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListRulebooks - Syntax ═══ /***************************************************/ /* This function lists all the rulebooks and */ /* their current settings */ /***************************************************/ Call PsnsListRulebooks handle, "stemname" ═══ PsnsListRulebooks - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0name The name of the rulebook. n.0description The description of the rulebook. n.0numRules The number of rules in the rulebook. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListRulebooks - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsListRulebooks - Remarks ═══ Use this function to list all the rulebooks. The information is returned in terms of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListRulebooks - Related functions ═══  PsnsCopyRulebook  PsnsCreateRulebook  PsnsDeleteRulebook  PsnsRenameRulebook  PsnsRulebookInfo ═══ 4.58. PsnsListSettings ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListSettings - Syntax ═══ /****************************************************/ /* This function lists many of the general options. */ /****************************************************/ Call PsnsListSettings handle, "stemname" ═══ PsnsListSettings - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. Parameter values returned are: 0manualPriority Possible values are: 1 Normal priority for manual backups. 2 High priority for manual backups. 0autoPriority Possible values are: 1 Normal priority for automatic backups. 2 High priority for automatic backups. 0tempPath Path for temporary files. 0flags A binary string representing the following on/off flags: SET_LOG Enable logging for backup, restore and drop activities. SET_LOG_SUCCESSES Log individual files which are successful. SET_LOG_FAILURES Log individual files which fail. SET_BACKUP_EXIT Enable the user exit on backup. SET_RESTORE_EXIT Enable the user exit on restore. Note: The first flag, SET_LOG, is represented by the least significant bit of the string (the right-most digit 00001); the second flag, SET_LOG_SUCCESSES, is represented by the next least significant bit of the string (the second digit from the right 00010), and so on. A bit set to one indicates the flag is set to true, a bit set to zero indicates false. 0logFileLimit Maximum number of lines in a log file. If this is 0 (zero) then there is no limit to the size of a log file. 0backupExit The name of a REXX command file to run on backup. 0restoreExit The name of a REXX command file to run on restore. 0enableACLBackup Possible values are: 1 Back up and restore Access Control Lists using BACKACC and RESTACC. 0 Do not back up and restore Access Control Lists. 0uadFilename The name of the file which contains the User Accounts Database, usually NET.ACC. For more information on REXX user exits and on backing up Access Control Lists, see the OS/2 Warp Server Backup/Restore online help. ═══ PsnsListSettings - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_PRIORITY PSNS_INVALID_PATH PSNS_INVALID_FLAGS PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsListSettings - Remarks ═══ Use this function to inspect the following settings:  Priority of backup and restore threads  Path for temporary files  Log file options  User exits The information is returned in terms of compound variables, taking the stemname specified, and a tail added by the program. The compound variables are listed in the parameters section. To change the settings, use PsnsSettingsInfo. stemname is in quotes to ensure that its case is correct. ═══ PsnsListSettings - Related functions ═══  PsnsDefaultsInfo  PsnsListDefaults  PsnsSettingsInfo ═══ 4.59. PsnsListSourceDrives ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListSourceDrives - Syntax ═══ /****************************************************/ /* This function lists all the source drives */ /****************************************************/ Call PsnsListSourceDrives handle, "stemname" ═══ PsnsListSourceDrives - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0driveLetter The drive letter of the source drive. n.0type The type of the source drive. Possible values are: HARDDISK A hard disk drive. DISKETTE A floppy disk drive. LANDRIVE A lan drive. OPTICAL A read-write optical drive. CDROM A CD-Rom drive. REMOVABLE A removable drive. OTHER Some other type of drive. n.0selected Possible values are: 1 This drive will be checked for files to back up. 0 This drive will not be checked for files to back up. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListSourceDrives - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsListSourceDrives - Remarks ═══ Use this function to list all the source drives. The information is returned in terms of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListSourceDrives - Related functions ═══  PsnsRefreshSourceDrives  PsnsSelectSourceDrive  PsnsSourceDriveType ═══ 4.60. PsnsListStorageDevices ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListStorageDevices - Syntax ═══ /****************************************************/ /* This function lists all the storage devices */ /****************************************************/ Call PsnsListStorageDevices handle, "stemname" ═══ PsnsListStorageDevices - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0name The name of the storage device. n.0dllName The name of the Dynamic Link Library (DLL) which implements the storage device. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListStorageDevices - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsListStorageDevices - Remarks ═══ Use this function to list all the storage devices. The information is returned in terms of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListStorageDevices - Related functions ═══  PsnsCreateStorageDevice  PsnsDeleteStorageDevice  PsnsGetStorageDeviceConfig  PsnsListCreatableStorageDevices  PsnsRefreshStorageDevices  PsnsSetStorageDeviceConfig  PsnsStorageDeviceInfo ═══ 4.61. PsnsListVolumeBackupSets ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListVolumeBackupSets - Syntax ═══ /***************************************************/ /* This function lists backup sets on a given */ /* volume or storage device */ /***************************************************/ Call PsnsListVolumeBackupSets handle, "stemname", volumeID, "storageDevice" ═══ PsnsListVolumeBackupSets - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0backupSet The name of the backup set n.0spaceUsed Space taken up on the volume by this backup set in units of unitMultiplier volumeID The ID of the volume for which a list of backup sets is required. storageDevice An optional parameter specifying a storage device. If this parameter is specified, then volumeID should be set to zero. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListVolumeBackupSets - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK PSNS_INVALID_VOLUME REXX_INVALID_HANDLE ═══ PsnsListVolumeBackupSets - Remarks ═══ Use this function to view the backup sets present on a specific volume. If the optional storageDevice parameter is filled in, then OS/2 Warp Server Backup/Restore will look at the volume in the storage device and generate a list of backup sets that are on the storage device. The information is returned in terms of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListVolumeBackupSets - Related functions ═══  PsnsListVolumes ═══ 4.62. PsnsListVolumes ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsListVolumes - Syntax ═══ /***************************************************/ /* This function lists all the volumes */ /***************************************************/ Call PsnsListVolumes handle, "stemname" ═══ PsnsListVolumes - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. The returned stemname parameter values are preceded by a list position number for the returned item in the form: stemname.n.parameter value where n is the list position number. The returned stemname parameter values are: n.0id The volume ID n.0name The name of the volume n.0storageDevice The storage device it uses n.0transferredOut Possible values are: 1 The volume belongs to a backup set that has been transferred out 0 The volume belongs to a backup set that has not been transferred out n.0available Possible values are: 1 The volume is available for use. 0 The user has made the volume unavailable and it will not be used for backing up or restoring data. n.0backupSets The number of backup sets which use this volume n.0unitMultiplier This specifies the units in which the volume usage information is specified. It is a number in bytes, for example, 1024 for kilobytes. n.0totalCapacity Total size of the volume in units of unitMultiplier n.0psnsCapacity Amount of space on the volume, in units of unitMultiplier, which is available for OS/2 Warp Server Backup/Restore to use, n.0psnsUsed Amount of space currently used on the volume by OS/2 Warp Server Backup/Restore, in units of unitMultiplier n.0psnsFree Amount of free space on the volume, in units of unitMultiplier, which OS/2 Warp Server Backup/Restore may use. n.0otherFree Amount of free space on the volume, in units of unitMultiplier, which OS/2 Warp Server Backup/Restore may not use. n.0totalBad Total amount of unusable space on the volume, in units of unitMultiplier n.0backupSet If the volume is used for only one backup set, this contains the name of that backup set. n.0indexNo If the volume is used for only one backup set, this contains the index of the volume within the backup set. A negative value signifies that the volume is an index diskette. A value of zero means that the volume is unassociated or fixed. In addition to the returned parameter values given above, the number of items in the list is returned in: stemname.0 For more information on this topic, see Listing functions ═══ PsnsListVolumes - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_LIST_HANDLE PSNS_NO_MORE_HANDLES PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsListVolumes - Remarks ═══ Use this function to view the information on all the volumes. The information is returned in terms of compound variables, taking the stemname specified, the number of the list item, and a tail added by the program. The compound variables are listed in the parameters section. "stemname.0", is set to the number of items in the list, so as to ensure that all the list items are looked at. stemname is in quotes to ensure that its case is correct. ═══ PsnsListVolumes - Related functions ═══  PsnsActivateVolume  PsnsAssociateVolume  PsnsCreateVolume  PsnsDeleteVolume  PsnsListVolumeBackupSets  PsnsVolumeInfo ═══ 4.63. PsnsPurgeFiles ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsPurgeFiles - Syntax ═══ /***************************************************/ /* This function empties the list of files to be */ /* backed up or restored. */ /***************************************************/ Call PsnsPurgeFiles handle ═══ PsnsPurgeFiles - Parameters ═══ handle Handle returned by PsnsInit ═══ PsnsPurgeFiles - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsPurgeFiles - Remarks ═══ Use this function to empty the list of files which you have created using PsnsAddFile. This means that you can start creating a new list of files to be backed up or restored. Note: This function does nothing to the files you have added to the list, it simply empties the list. ═══ PsnsPurgeFiles - Related functions ═══  PsnsAddFile  PsnsBackupFiles  PsnsDropFiles  PsnsListFiles  PsnsRestoreFiles ═══ 4.64. PsnsRefreshSourceDrives ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRefreshSourceDrives - Syntax ═══ /****************************************************/ /* This function looks for drives on the system and */ /* refreshes the list of source drives. */ /****************************************************/ Call PsnsRefreshSourceDrives handle ═══ PsnsRefreshSourceDrives - Parameters ═══ handle Handle returned by PsnsInit ═══ PsnsRefreshSourceDrives - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE REXX_INVALID_HANDLE ═══ PsnsRefreshSourceDrives - Remarks ═══ Use this function to make OS/2 Warp Server Backup/Restore scan for drives and automatically refresh the list of source drives. This happens automatically every time OS/2 Warp Server Backup/Restore starts up. ═══ PsnsRefreshSourceDrives - Related functions ═══  PsnsListSourceDrives  PsnsSelectSourceDrive  PsnsSourceDriveType ═══ 4.65. PsnsRefreshStorageDevices ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRefreshStorageDevices - Syntax ═══ /****************************************************/ /* This function looks for locally attached storage */ /* devices and automatically adds them to the list */ /* of storage devices. */ /****************************************************/ Call PsnsRefreshStorageDevices handle ═══ PsnsRefreshStorageDevices - Parameters ═══ handle Handle returned by PsnsInit ═══ PsnsRefreshStorageDevices - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE REXX_INVALID_HANDLE ═══ PsnsRefreshStorageDevices - Remarks ═══ Use this function to make OS/2 Warp Server Backup/Restore scan for locally attached storage devices and add them to the list of storage devices. This happens automatically every time OS/2 Warp Server Backup/Restore starts up. ═══ PsnsRefreshStorageDevices - Related functions ═══  PsnsCreateStorageDevice  PsnsDeleteStorageDevice  PsnsGetStorageDeviceConfig  PsnsListCreatableStorageDevices  PsnsListStorageDevices  PsnsSetStorageDeviceConfig  PsnsStorageDeviceInfo ═══ 4.66. PsnsRenameBackupMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRenameBackupMethod - Syntax ═══ /***************************************************/ /* This function renames an existing backup method */ /***************************************************/ Call PsnsRenameBackupMethod handle, "name", "newName" ═══ PsnsRenameBackupMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the backup method "newName" The new name of the backup method ═══ PsnsRenameBackupMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_METHOD PSNS_ALREADY_EXISTS PSNS_INVALID_NAME PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsRenameBackupMethod - Remarks ═══ Use this function to rename a backup method. newName must not be the name of any existing backup method. name and newName are in quotes to ensure that their cases are correct. ═══ PsnsRenameBackupMethod - Related functions ═══  PsnsBackupMethodInfo  PsnsCopyBackupMethod  PsnsCreateBackupMethod  PsnsDeleteBackupMethod  PsnsEstimateBackupMethod  PsnsListBackupMethods  PsnsRunBackupMethod ═══ 4.67. PsnsRenameFileFilter ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRenameFileFilter - Syntax ═══ /***************************************************/ /* This function renames an existing file filter */ /***************************************************/ Call PsnsRenameFileFilter handle, "name", "newName" ═══ PsnsRenameFileFilter - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the file filter "newName" The new name of the file filter ═══ PsnsRenameFileFilter - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_FILE_FILTER PSNS_ALREADY_EXISTS PSNS_INVALID_NAME PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsRenameFileFilter - Remarks ═══ Use this function to rename a file filter. newName must not be the name of any existing file filter. name and newName are in quotes to ensure that their cases are correct. ═══ PsnsRenameFileFilter - Related functions ═══  PsnsCopyFileFilter  PsnsCreateFileFilter  PsnsDeleteFileFilter  PsnsFileFilterInfo  PsnsListFileFilters ═══ 4.68. PsnsRenameRestoreMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRenameRestoreMethod - Syntax ═══ /****************************************************/ /* This function renames an existing restore method */ /****************************************************/ Call PsnsRenameRestoreMethod handle, "name", "newName" ═══ PsnsRenameRestoreMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the restore method "newName" The new name of the restore method ═══ PsnsRenameRestoreMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RESTORE_METHOD PSNS_ALREADY_EXISTS PSNS_INVALID_NAME PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsRenameRestoreMethod - Remarks ═══ Use this function to rename a restore method. newName must not be the name of any existing restore method. name and newName are in quotes to ensure that their cases are correct. ═══ PsnsRenameRestoreMethod - Related functions ═══  PsnsCopyRestoreMethod  PsnsCreateRestoreMethod  PsnsDeleteRestoreMethod  PsnsEstimateRestoreMethod  PsnsListRestoreMethods  PsnsRestoreMethodInfo  PsnsRunRestoreMethod ═══ 4.69. PsnsRenameRulebook ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRenameRulebook - Syntax ═══ /***************************************************/ /* This function renames an existing rulebook */ /***************************************************/ Call PsnsRenameRulebook handle, "name", "newName" ═══ PsnsRenameRulebook - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the rulebook "newName" The new name of the rulebook ═══ PsnsRenameRulebook - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RULEBOOK PSNS_ALREADY_EXISTS PSNS_INVALID_NAME PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsRenameRulebook - Remarks ═══ Use this function to rename a rulebook. newName must not be the name of any existing rulebook. name and newName are in quotes to ensure that their cases are correct. ═══ PsnsRenameRulebook - Related functions ═══  PsnsCopyRulebook  PsnsCreateRulebook  PsnsDeleteRulebook  PsnsListRulebooks  PsnsRulebookInfo ═══ 4.70. PsnsRestoreFiles ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRestoreFiles - Syntax ═══ /***************************************************/ /* This function restores a list of files created */ /* by calls to PsnsAddFile */ /***************************************************/ Call PsnsRestoreFiles handle, "stemname" ═══ PsnsRestoreFiles - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken. Parameters to use are: 0backupSet This can be any one of the following: The name of the backup set from which the files are to be restored An asterisk (*) to restore files from all backup sets A zero length string (defined by two consecutive single or double quotation marks) to restore files from the default backup set. ═══ PsnsRestoreFiles - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_TRANSFERRED_OUT PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsRestoreFiles - Remarks ═══ Use this function to restore a list of files. stemname is in quotes to ensure that its case is correct. ═══ PsnsRestoreFiles - Related functions ═══  PsnsAddFile  PsnsBackupFiles  PsnsDropFiles  PsnsListFiles  PsnsPurgeFiles ═══ 4.71. PsnsRestoreMethodInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRestoreMethodInfo - Syntax ═══ /***************************************************/ /* This function gets or sets all the information */ /* about a restore method */ /***************************************************/ Call PsnsRestoreMethodInfo handle, "stemname" ═══ PsnsRestoreMethodInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may have their values changed or filled in by the API are: 0name The name of the restore method; this is always required. 0description The description of the restore method. 0backupSet This can be any one of the following: The name of the backup set from which the restore is to be made An asterisk (*) to restore from all backup sets A zero length string (defined by two consecutive single or double quotation marks) to restore from the default backup set. 0allFiles Possible values are: 1 Allow any file to be restored; the drive, directory, pattern and subdirectories fields are ignored. 0 Allow only those files specified by the drive, directory, pattern and subdirectories fields to be restored. 0drive Original drive of the files to be restored. 0directory Original directory of the files to be restored. 0pattern Wildcard selecting which files are to be restored. 0subdirectories Possible values are: 1 Restore files in subdirectories of the selected directory. 0 Do not restore files in subdirectories. 0byDate Possible values are: 1 Restore files as they were on the date specified in the date and time fields below. 0 Restore the most recent generation of each file. 0day Files will be restored to the state they were in on this date if byDate is set to 1. 0month Files will be restored to the state they were in on this date if byDate is set to 1. 0year Files will be restored to the state they were in on this date if byDate is set to 1. 0hours Files will be restored to the state they were in at this time if byDate is set to 1. 0minutes Files will be restored to the state they were in at this time if byDate is set to 1. 0seconds Files will be restored to the state they were in at this time if byDate is set to 1. 0preview: 1 Show a preview before the restore, which allows the user to select or deselect individual files. 0 No preview is shown before the restore. Note: Showing a preview is only useful if the restore method is to be run from the OS/2 Warp Server Backup/Restore window; it is not possible to show a preview when running a restore method using the API. 0prompt Possible values are: 1 Prompt the user to select a generation of each file to be restored. 0 The user is not prompted; the most recent generation of each file is restored. Note: This is only useful if the restore method is to be run from the OS/2 Warp Server Backup/Restore window; it is not possible to pick generations when running a restore method using the API. 0originalLocation Possible values are: 1 Files are restored to their original locations; destinationDrive and destinationPath are ignored. 0 Files are restored to the drive and path specified in destinationDrive and destinationPath. 0destinationDrive The drive to which to files are to be restored if originalLocation is set to 0. 0destinationPath The path to which files are to be restored if originalLocation is set to 0. ═══ PsnsRestoreMethodInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RESTORE_METHOD PSNS_INVALID_BACKUP_SET PSNS_INVALID_DRIVE PSNS_INVALID_PATH PSNS_INVALID_FILENAME PSNS_INVALID_MASK PSNS_IN_USE REXX_INVALID_HANDLE REXX_INVALID_MASK_NAME ═══ PsnsRestoreMethodInfo - Remarks ═══ Use this function to change a restore method or to inspect the current settings. In order to look at the settings, without changing any, do not create any compound variables except that of the restore method name, the API then fills in all the compound variables, so as to show the settings. Putting in a parameter means that it will be changed, from its old value. This, however is not true for the name field. It is not possible to change the name of a restore method with this call; to do that, use PsnsRenameRestoreMethod stemname is in quotes to ensure that its case is correct. ═══ PsnsRestoreMethodInfo - Related functions ═══  PsnsCopyRestoreMethod  PsnsCreateRestoreMethod  PsnsDeleteRestoreMethod  PsnsEstimateRestoreMethod  PsnsListRestoreMethods  PsnsRenameRestoreMethod  PsnsRunRestoreMethod ═══ 4.72. PsnsRulebookInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRulebookInfo - Syntax ═══ /***************************************************/ /* This function gets or sets all the information */ /* about a rulebook */ /***************************************************/ Call PsnsRulebookInfo handle, "stemname" ═══ PsnsRulebookInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may have their values changed or filled in by the API are: 0name The name of the rulebook. This is always required. 0description Description of the rulebook. ═══ PsnsRulebookInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RULEBOOK PSNS_IN_USE PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsRulebookInfo - Remarks ═══ Use this function to change a rulebook or to inspect the current settings of a rulebook. In order to look at the settings, without changing any, do not create any compound variables, except that of the rulebook name, the API then fills in all the compound variables, so as to show the current settings. Putting in a parameter means that it will be changed, from its old value. This, however is not true for the name field. It is not possible to change the name of a rulebook with this call; to do that, use PsnsRenameRulebook. stemname is in quotes to ensure that its case is correct. ═══ PsnsRulebookInfo - Related functions ═══  PsnsCopyRulebook  PsnsCreateRulebook  PsnsDeleteRulebook  PsnsListRulebooks  PsnsRenameRulebook ═══ 4.73. PsnsRulebookRuleInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRulebookRuleInfo - Syntax ═══ /***************************************************/ /* This function gets or sets all the information */ /* about a rule in a rulebook */ /***************************************************/ Call PsnsRulebookRuleInfo handle, "stemname", position, "rulebookName" ═══ PsnsRulebookRuleInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may have their values changed or filled in by the API are: 0drive The drive letter to be included / excluded, or an asterisk (*) for all drives. 0directory The directory to be included / excluded. 0pattern Wildcard specifying which files are to be included / excluded. 0subdirectories Possible values are: 1 Include / exclude subdirectories in the specified directory. 0 Do not include / exclude subdirectories. 0generations Number of generations to keep of specified files. 0compression Possible values are: NOCOMPRESSION Compress the specified files. COMPRESSION Do not compress the specified files. DEFAULT Use the default compression for the specified files. "rulebookName" Name of the rulebook to which the rule is to be added. position This specifies the position where the rule is to be added to the file filter; 1 means add at the beginning, 2 after the first rule and so on. ═══ PsnsRulebookRuleInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RULEBOOK PSNS_INVALID_POSITION PSNS_INVALID_DRIVE PSNS_INVALID_PATH PSNS_INVALID_FILENAME PSNS_INVALID_GENERATIONS PSNS_INVALID_COMPRESSION PSNS_IN_USE PSNS_INVALID_MASK REXX_INVALID_HANDLE REXX_INVALID_MASK_NAME ═══ PsnsRulebookRuleInfo - Remarks ═══ Use this function to change a rulebook rule or to inspect the current settings of a rulebook rule. In order to look at the settings without changing any, do not create any compound variables, the API then fills in all the compound variables, so as to show the current settings. Putting in a parameter means that it will be changed, from its old value. stemname and rulebookName are in quotes to ensure that their cases are correct. ═══ PsnsRulebookRuleInfo - Related functions ═══  PsnsAddRulebookRule  PsnsDeleteRulebookRule  PsnsListRulebookRule ═══ 4.74. PsnsRunBackupMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRunBackupMethod - Syntax ═══ /***************************************************/ /* This function runs a backup method */ /***************************************************/ Call PsnsRunBackupMethod handle, "name" ═══ PsnsRunBackupMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the backup method to run ═══ PsnsRunBackupMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_METHOD PSNS_ARCHIVE_ERROR PSNS_IN_USE PSNS_TRANSFERRED_OUT REXX_INVALID_HANDLE ═══ PsnsRunBackupMethod - Remarks ═══ Use this function to run a backup method. name is in quotes to ensure that its case is correct. ═══ PsnsRunBackupMethod - Related functions ═══  PsnsEstimateBackupMethod  PsnsEstimateRestoreMethod  PsnsRunRestoreMethod ═══ 4.75. PsnsRunRestoreMethod ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsRunRestoreMethod - Syntax ═══ /***************************************************/ /* This function runs a restore method */ /***************************************************/ Call PsnsRunRestoreMethod handle, "name", "base", "incremental" ═══ PsnsRunRestoreMethod - Parameters ═══ handle Handle returned by PsnsInit "name" The name of the restore method to run "base" This parameter is only used when running a restore method that references a dual device backup set. It is omitted for single device backup sets. Possible values are: 1 Restore from the base storage device. 0 Do not restore from the base storage device. "incremental" This parameter is only used when running a restore method that references a dual device backup set. It is omitted for single device backup sets. Possible values are: 1 Restore from the incremental storage device. 0 Do not restore from the incremental storage device. ═══ PsnsRunRestoreMethod - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_RESTORE_METHOD PSNS_ARCHIVE_ERROR PSNS_IN_USE PSNS_TRANSFERRED_OUT REXX_INVALID_HANDLE ═══ PsnsRunRestoreMethod - Remarks ═══ Use this function to run a restore method. When running a restore method which uses a normal, single storage device backup set, the last two parameters should be omitted. When running a restore method which uses a dual device backup set, specify all parameters. name, base and incremental are in quotes to ensure that their case is correct. ═══ PsnsRunRestoreMethod - Related functions ═══  PsnsEstimateBackupMethod  PsnsEstimateRestoreMethod  PsnsRunBackupMethod ═══ 4.76. PsnsSelectSourceDrive ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsSelectSourceDrive - Syntax ═══ /****************************************************/ /* This function selects whether or not a source */ /* drive should be checked for files to back up. */ /****************************************************/ Call PsnsSelectSourceDrive handle, "drive", "use" ═══ PsnsSelectSourceDrive - Parameters ═══ handle Handle returned by PsnsInit "drive" Drive letter to select or deselect. "use" SELECT Select this source drive for backup. DESELECT Deselect this source drive for backup. ═══ PsnsSelectSourceDrive - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_SOURCE_DRIVE REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsSelectSourceDrive - Remarks ═══ Use this function to tell OS/2 Warp Server Backup/Restore whether or not to check a source drive for files when performing a backup. For example, if you had a backup method to back up all program source files on your computer, you would probably want to check all local drives but not check any network drives you have attatched. By default, local drives are selected and remote drives are not selected. drive and use are in quotes to ensure that their cases are correct. ═══ PsnsSelectSourceDrive - Related functions ═══  PsnsListSourceDrives  PsnsRefreshSourceDrives  PsnsSourceDriveType ═══ 4.77. PsnsSetBackupSetConfig ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsSetBackupSetConfig - Syntax ═══ /****************************************************/ /* This function sets the configuration information */ /* for a backup set. */ /****************************************************/ Call PsnsSetBackupSetConfig handle, "setName", "configString", "incConfigString" ═══ PsnsSetBackupSetConfig - Parameters ═══ handle Handle returned by PsnsInit "setName" The name of the backup set to configure "configString" Configuration string for the backup set. The format of this string depends on which storage device the backup set uses. For dual device backup sets this is the configuration string for the base backup set. "incConfigString" Configuration string for the incremental storage device of a dual backup set. The format of this string depends on which storage device the backup set uses. For single device backup sets this argument should be omitted. ═══ PsnsSetBackupSetConfig - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_INVALID_CONFIGURATION PSNS_IN_USE PSNS_TRANSFERRED_OUT PSNS_INVALID_KEYWORD PSNS_INVALID_VALUE PSNS_SYNTAX_ERROR PSNS_INCOMPLETE_STRING PSNS_SEMANTIC_ERROR REXX_INVALID_HANDLE ═══ PsnsSetBackupSetConfig - Remarks ═══ Use this function to set the configuration information for a backup set. The format of this information depends on the storage device which the backup set uses; to find out how all the standard OS/2 Warp Server Backup/Restore storage devices handle this, see Storage Device Configuration. setName, configString and incConfigString are in quotes to ensure that their cases are correct. ═══ PsnsSetBackupSetConfig - Related functions ═══  PsnsGetBackupSetConfig  PsnsGetStorageDeviceConfig  PsnsSetStorageDeviceConfig  PsnsTransferIn ═══ 4.78. PsnsSetStorageDeviceConfig ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsSetStorageDeviceConfig - Syntax ═══ /****************************************************/ /* This function sets the configuration information */ /* for a storage device. */ /****************************************************/ Call PsnsSetStorageDeviceConfig handle, "deviceName", "configString" ═══ PsnsSetStorageDeviceConfig - Parameters ═══ handle Handle returned by PsnsInit "deviceName" The name of the storage device to configure. "configString" Configuration string for the storage device. The format of this string depends on the storage device type. ═══ PsnsSetStorageDeviceConfig - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_STORAGE_DEVICE PSNS_INVALID_CONFIGURATION PSNS_IN_USE PSNS_NOT_CONFIGURABLE PSNS_INVALID_KEYWORD PSNS_INVALID_VALUE PSNS_SYNTAX_ERROR PSNS_INCOMPLETE_STRING PSNS_SEMANTIC_ERROR REXX_INVALID_HANDLE ═══ PsnsSetStorageDeviceConfig - Remarks ═══ Use this function to set the configuration information for a device. The only storage device currently changeable using this command is ADSM. The format of this information depends on the storage device; to find out how all the standard OS/2 Warp Server Backup/Restore storage devices handle this, see Storage Device Configuration. deviceName and configString are in quotes to ensure that their cases are correct. ═══ PsnsSetStorageDeviceConfig - Related functions ═══  PsnsGetBackupSetConfig  PsnsGetStorageDeviceConfig  PsnsSetBackupSetConfig ═══ 4.79. PsnsSettingsInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsSettingsInfo - Syntax ═══ /***************************************************/ /* This function sets many of the general options. */ /***************************************************/ Call PsnsSettingsInfo handle, "stemname" ═══ PsnsSettingsInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information to be changed has been put. Stemname parameters which may be used are: 0manualPriority Possible values are: NORMAL Normal priority for manual backups. HIGH High priority for manual backups. 0autoPriority Possible values are: NORMAL Normal priority for automatic backups. HIGH High priority for automatic backups. 0tempPath Path for temporary files. 0flags A binary string representing the following on/off flags: SET_LOG Enable logging for backup, restore and drop activities. SET_LOG_SUCCESSES Log individual files which are successful. SET_LOG_FAILURES Log individual files which fail. SET_BACKUP_EXIT Enable the user exit on backup. SET_RESTORE_EXIT Enable the user exit on restore. Note: The first flag, SET_LOG, is represented by the least significant bit of the string (the right-most digit 00001); the second flag, SET_LOG_SUCCESSES, is represented by the next least significant bit of the string (the second digit from the right 00010), and so on. A bit set to one indicates the flag is set to true, a bit set to zero indicates false. 0logFileLimit Maximum number of lines in a log file; if this is 0 then there is no limit to the size of a log file. 0backupExit The name of a REXX command file to run on backup. 0restoreExit The name of a REXX command file to run on restore. 0enableACLBackup Possible values are: 1 Back up and restore Access Control Lists using BACKACC and RESTACC. 0 Do not back up and restore Access Control Lists. 0uadFilename The name of the file which contains the User Accounts Database, usually NET.ACC. For more information on REXX user exits and on backing up Access Control Lists, see the OS/2 Warp Server Backup/Restore online help. ═══ PsnsSettingsInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_PRIORITY PSNS_INVALID_PATH PSNS_INVALID_FLAGS PSNS_INVALID_MASK REXX_INVALID_HANDLE REXX_INVALID_MASK_NAME ═══ PsnsSettingsInfo - Remarks ═══ Use this function to change the following settings:  Priority of backup and restore threads  Path for temporary files  Log file options  User exits Putting in a parameter means that it will be changed, from its old value. To look at the current settings, use PsnsListSettings. stemname is in quotes to ensure that its case is correct. ═══ PsnsSettingsInfo - Related functions ═══  PsnsDefaultsInfo  PsnsListDefaults  PsnsListSettings ═══ 4.80. PsnsSourceDriveType ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsSourceDriveType - Syntax ═══ /****************************************************/ /* This function sets the type of a source drive */ /****************************************************/ Call PsnsSourceDriveType handle, "drive", "driveType" ═══ PsnsSourceDriveType - Parameters ═══ handle Handle returned by PsnsInit "drive" The drive letter of the source drive to change. "driveType" New type for the source drive. Possible values are: HARDDISK A hard disk drive. DISKETTE A floppy disk drive. LANDRIVE A lan drive. OPTICAL A read-write optical drive. CDROM A CD-Rom drive. REMOVABLE A removable drive OTHER Some other type of drive. ═══ PsnsSourceDriveType - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_DRIVE_TYPE REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsSourceDriveType - Remarks ═══ Use this function to tell OS/2 Warp Server Backup/Restore what type of drive a particular source drive is. Usually this should be detected automatically but this call allows the user to override the automatic detection. drive and driveType are in quotes to ensure that their cases are correct. ═══ PsnsSourceDriveType - Related functions ═══  PsnsListSourceDrives  PsnsRefreshSourceDrives  PsnsSelectSourceDrive ═══ 4.81. PsnsStorageDeviceInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsStorageDeviceInfo - Syntax ═══ /****************************************************/ /* This function gets all the information about a */ /* storage device */ /****************************************************/ Call PsnsStorageDeviceInfo handle, "stemname" ═══ PsnsStorageDeviceInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem from which information is to be taken and/or put into. Stemname parameters which may be used are: 0name The name of the storage device. This is always required. 0dllName The name of the Dynamic Link Library (DLL) which implements the storage device. ═══ PsnsStorageDeviceInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_STORAGE_DEVICE PSNS_INVALID_MASK PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsStorageDeviceInfo - Remarks ═══ Use this function to get information about a storage device. The information is returned in terms of compound variables, taking the stemname specified, and a tail added by the program. The compound variables are listed in the parameters section. stemname is in quotes to ensure that its case is correct. ═══ PsnsStorageDeviceInfo - Related functions ═══  PsnsCreateStorageDevice  PsnsDeleteStorageDevice  PsnsGetStorageDeviceConfig  PsnsListCreatableStorageDevices  PsnsListStorageDevices  PsnsRefreshStorageDevices  PsnsSetStorageDeviceConfig ═══ 4.82. PsnsTerm ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsTerm - Syntax ═══ /***************************************************/ /* This function terminates an API session and */ /* frees the API handle. */ /***************************************************/ Call PsnsTerm handle ═══ PsnsTerm - Parameters ═══ handle Handle returned by PsnsInit ═══ PsnsTerm - Returns ═══ PSNS_OK PSNS_COMMUNICATIONS_ERROR PSNS_HANDLE_IN_USE PSNS_INVALID_HANDLE REXX_INVALID_HANDLE ═══ PsnsTerm - Remarks ═══ This function should be called whenever you have finished with a handle which was obtained using PsnsInit ═══ PsnsTerm - Related functions ═══  PsnsInit ═══ 4.83. PsnsTransferBackupSet ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsTransferBackupSet - Syntax ═══ /****************************************************/ /* This function transfers a backup set in or out */ /****************************************************/ Call PsnsTransferBackupSet handle, "backupSetName", "action", "base" ═══ PsnsTransferBackupSet - Parameters ═══ handle Handle returned by PsnsInit "backupSetName" The name of the backup set to transfer in or out "action" Possible values are: IN Transfer the backup set in OUT Transfer the backup set out "base" This parameter is only used when transferring out a dual device backup set. It is omitted for single device backup sets and when transferring in. Possible values are: BASE Transfer out to the base storage device. INC Transfer out to the incremental storage device. ═══ PsnsTransferBackupSet - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_BACKUP_SET PSNS_TRANSFERRED_OUT PSNS_TRANSFERRED_IN REXX_INVALID_HANDLE REXX_INVALID_PARAMETER ═══ PsnsTransferBackupSet - Remarks ═══ Use this function to transfer out or transfer in a backup set. When a backup set is transferred out, you cannot use it for backing up or restoring, but you can take it to another computer and transfer it in to use the data on it. Transferring out ensures that all indexing information stored on the backup set media is up to date. It is only necessary to specify all the parameters when transferring out a dual device backup set. In all other cases, the last parameter is omitted. backupSetName, action and base are in quotes to ensure that their cases are correct. ═══ PsnsTransferBackupSet - Related functions ═══  PsnsBackupSetInfo  PsnsCreateBackupSet  PsnsDeleteBackupSet  PsnsEmptyBackupSet  PsnsGetBackupSetConfig  PsnsGetLogFile  PsnsListBackupSets  PsnsSetBackupSetConfig  PsnsTransferIn ═══ 4.84. PsnsTransferIn ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsTransferIn - Syntax ═══ /****************************************************/ /* This function transfers in a backup set from a */ /* storage device. */ /****************************************************/ Call PsnsTransferIn handle, "storageDevice", "backupsetName" ═══ PsnsTransferIn - Parameters ═══ handle Handle returned by PsnsInit "storageDevice" Name of the storage device from which to transfer in "backupsetName" The name of the backup set to transfer in ═══ PsnsTransferIn - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_STORAGE_DEVICE PSNS_IN_USE REXX_INVALID_HANDLE ═══ PsnsTransferIn - Remarks ═══ Use this function to transfer in a backup set which OS/2 Warp Server Backup/Restore does not know about. This function reads all the indexing information off the backup set media and creates a new backup set which refers to it. To see the name of this new backup set use the function PsnsListBackupSets. storageDevice and backupsetName are in quotes to ensure that their cases are correct. ═══ PsnsTransferIn - Related functions ═══  PsnsBackupSetInfo  PsnsCreateBackupSet  PsnsDeleteBackupSet  PsnsEmptyBackupSet  PsnsGetBackupSetConfig  PsnsGetLogFile  PsnsListBackupSets  PsnsSetBackupSetConfig  PsnsTransferBackupSet ═══ 4.85. PsnsVolumeInfo ═══ Select an item  Syntax  Parameters  Returns  Remarks  Example  Related functions ═══ PsnsVolumeInfo - Syntax ═══ /***************************************************/ /* This function gets all the information about a */ /* volume */ /***************************************************/ Call PsnsVolumeInfo handle, "stemname", volumeID ═══ PsnsVolumeInfo - Parameters ═══ handle Handle returned by PsnsInit "stemname" The name of the stem into which the information is to be put. Stemname parameter values returned are: 0id The volume ID 0name The name of the volume 0storageDevice The storage device used by the volume 0transferredOut Whether or not the volume has been transferred out; possible values are: 1 The volume belongs to a backup set that has been transferred out. 0 The volume belongs to a backup set that has not been transferred out. 0available Whether or not the volume is available for use; possible values are: 1 The volume is available for use. 0 The user has made the volume unavailable and it will not be used for backing up or restoring data. 0backupSets The number of backup sets which use this volume 0unitMultiplier This specifies the units in which the volume usage information is specified. It is a number in bytes, for example, 1024 for kilobytes. 0totalCapacity Total size of the volume in units of unitMultiplier 0psnsCapacity The amount of space on the volume, in units of unitMultiplier which is available for OS/2 Warp Server Backup/Restore to use. 0psnsUsed Amount of space currently used on the volume by OS/2 Warp Server Backup/Restore in units of unitMultiplier. 0psnsFree Amount of free space on the volume, in units of unitMultiplier which OS/2 Warp Server Backup/Restore may use. 0otherFree Amount of free space on the volume, in units of unitMultiplier which OS/2 Warp Server Backup/Restore may not use. 0totalBad Total amount of unusable space on the volume, in units of unitMultiplier 0backupSet If the volume is used for only one backup set, this contains the name of that backup set 0indexNo If the volume is used for only one backup set, this contains the index of the volume within the backup set. A negative value signifies that the volume is an index diskette. A value of zero means that the volume is unassociated or fixed. volumeID The ID of the volume to be inspected. ═══ PsnsVolumeInfo - Returns ═══ PSNS_OK PSNS_HANDLE_IN_USE PSNS_COMMUNICATIONS_ERROR PSNS_INVALID_HANDLE PSNS_INVALID_VOLUME PSNS_IN_USE PSNS_INVALID_MASK REXX_INVALID_HANDLE ═══ PsnsVolumeInfo - Remarks ═══ Use this function to get information about a volume. The information is returned in terms of compound variables, taking the stemname specified, and a tail added by the program. The compound variables are listed in the parameters section. stemname is in quotes to ensure that its case is correct. ═══ PsnsVolumeInfo - Related functions ═══  PsnsActivateVolume  PsnsAssociateVolume  PsnsCreateVolume  PsnsDeleteVolume  PsnsListVolumeBackupSets  PsnsListVolumes ═══ 5. Errors ═══ 0 PSNS_OK No errors occurred. 1 PSNS_NO_MORE_HANDLES Too many list handles are in use and a new one cannot be allocated. 3 PSNS_UNKNOWN_ERROR An unknown internal error occurred. 4 PSNS_HANDLE_IN_USE An API call is already in progress using this handle. You may not call more than one API function at the same time with the same handle; if another thread needs to call API functions, it should obtain a new handle using PsnsInit. 5 PSNS_ALREADY_EXISTS You are trying to create, copy or rename an object, but the name you have specified already exists. 6 PSNS_ARCHIVE_ERROR An internal error was encountered when processing index files. 7 PSNS_INVALID_HANDLE The handle you have passed is not one which was returned by PsnsInit. 8 PSNS_INVALID_LIST_HANDLE The list handle you have passed to a listing function is not known. 9 PSNS_INVALID_PARAMETER A parameter passed to an API function is invalid, for example a pointer is NULL when it shouldn't be. 10 PSNS_INVALID_BACKUP_METHOD The named backup method does not exist. 11 PSNS_INVALID_VOLUME The given volume ID does not exist. 12 PSNS_INVALID_EVENT_TYPE The given event type is not a valid one. Look in PsnsCreateEvent to see a list of valid types. 13 PSNS_INVALID_EVENT_OPTION The given event option is not defined. 14 PSNS_INVALID_MASK The mask you have supplied does not make sense, for example, searching for files which are both larger and smaller than 10kB. 15 PSNS_INVALID_DRIVE_TYPE The given drive type is not one defined in PsnsSourceDriveType. 16 PSNS_INVALID_GENERATIONS The number of generations you have specified is not allowed; the number of generations must be between 1 and 250. 17 PSNS_INVALID_RULEBOOK The named rulebook does not exist. 18 PSNS_INVALID_FILE_FILTER The named file filter does not exist. 19 PSNS_INVALID_BACKUP_SET The named backup set does not exist. 20 PSNS_INVALID_RESTORE_METHOD The named restore method does not exist. 21 PSNS_INVALID_SOURCE_DRIVE You gave an invalid character for a source drive letter. 22 PSNS_INVALID_POSITION The position you referred to in a rule or file filter is out of range. 23 PSNS_INVALID_EVENT The given event ID does not exist. 24 PSNS_INVALID_DRIVE The specified drive is not a valid drive letter. 25 PSNS_INVALID_PATH The specified path is not valid. 26 PSNS_INVALID_FILENAME The specified filename is not valid. 27 PSNS_ALREADY_ASSOCIATED The volume is already associated with a backup set. 28 PSNS_INVALID_NAME The name you gave when creating, copying or renaming an object is not valid. See object names for a description of what constitutes a valid object name. 29 PSNS_INVALID_FILE_FILTER_TYPE The given file filter type is not one defined in PsnsCreateFileFilter. 30 PSNS_INVALID_STORAGE_DEVICE_TYPE The given storage device type does not exist as a creatable storage device type. 31 PSNS_INVALID_STORAGE_DEVICE The named storage device does not exist. 32 PSNS_IN_USE You tried to delete or change an object which is currently in use and therefore cannot be deleted or changed. 33 PSNS_CANNOT_DELETE You tried to delete a storage device or volume which may not be deleted. 34 PSNS_FILE_NOT_FOUND The named file was not found in the backup set. 35 PSNS_INVALID_TIME The time you specified for an event is not valid. 36 PSNS_NO_EVENTS There are no events currently scheduled. 37 PSNS_TOO_MUCH_DATA The buffer you supplied is not large enough to receive all the data which would be returned; the data has been truncated to fit in the buffer. 38 PSNS_CANT_CONNECT An error occurred when trying to connect to the API server. 39 PSNS_INVALID_CONFIGURATION The configuration string you gave for a storage device or backup method is not valid. 40 PSNS_INVALID_PRIORITY The given priority is not valid, it must have a value of 1 for normal priority, or 2 for high priority. 41 PSNS_INVALID_GENERATION The generation you specified does not exist. 42 PSNS_TRANSFERRED_IN The backup set was already transferred in. 43 PSNS_TRANSFERRED_OUT The backup set was already transferred out, or you tried to perform an operation using a backup set which is transferred out. 44 PSNS_INVALID_COMPRESSION The specified compression option is not valid. 45 PSNS_MALFORMED_METHOD Some options in the backup or restore method are not compatible with each other, 46 PSNS_INVALID_DATE The given date is not valid. 47 PSNS_READONLY You tried to change a rule which cannot be changed. 48 PSNS_NOT_CONFIGURABLE The backup set or storage device configuration cannot be changed now. 49 PSNS_INVALID_FLAGS The flags you specified in PsnsSettingsInfo are not valid. 50 PSNS_COMMUNICATIONS_ERROR Contact with the API server has been lost; all handles to that server have been closed. 51 PSNS_INVALID_RC The return code passed to PsnsGetMessageText is not valid. 52 PSNS_INDEX_DISKETTE The volume ID passed to PsnsActivateVolume is that of an index diskette. The active state of index diskettes cannot be altered in this way. 53 PSNS_FIXED_VOLUME An API function for working with removable volumes has been passed the ID of a fixed volume. 54 PSNS_INAPPROPRIATE_BACKUP_SET The backup set passed to PsnsAssociateVolume is not appropriate for association with the volume. 55 PSNS_INVALID_KEYWORD A keyword in a configuration string is incorrect, for example, using the BEEP keyword with an ADSM storage device. 56 PSNS_INVALID_VALUE A value in a configuration string is incorrect, for example, a non-numeric was found where a numeric value was expected. 57 PSNS_SYNTAX_ERROR A configuration string did not conform to the format described in Storage Device & Backup Set Configuration. 58 PSNS_INCOMPLETE_STRING A required parameter was missing from the configuration string. 59 PSNS_SEMANTIC_ERROR An error occurred whilst processing a configuration string, for example, a path name is invalid. 60 PSNS_ERROR_DURING_BACKUP There were errors during the backup. If the logging of failures is enabled, the backup set log contains details of the errors. 61 PSNS_ERROR_DURING_RESTORE There were errors during the restore. If the logging of failures is enabled, the backup set log contains details of the errors. 62 PSNS_UNHANDLED_EXCEPTION An OS/2 Warp Server Backup/Restore internal error occurred; there was an unhandled exception. 63 REXX_INVALID_MASK_NAME The name specified for a mask is invalid, please check with the parameter definitions to ensure that the correct mask name is being used. 64 REXX_INVALID_PARAMETER The value specified for a parameter is an unexpected one, please check the parameter definitions to ensure that a valid parameter is used. 65 REXX_INVALID_HANDLE The handle has not been specified correctly, or has corrupted. Please check that it has been correctly set up using PsnsInit. ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteBackupMethod */ /* PsnsListBackupMethods */ /* */ /* Delete backup methods which don't back up */ /* subdirectories. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the backup methods. */ /* Drop the stem to be used. */ Drop stem. Call PsnsListBackupMethods handle, 'stem' Say 'PsnsListBackupMethods returned' result /* For all the backup methods with the */ /* subdirectory flag false, print their name */ /* and delete them. */ Do x=1 to stem.0 If stem.x.0subdirectories=0 Then Do Say stem.x.0name Call PsnsDeleteBackupMethod handle, stem.x.0name End End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsBackupMethodInfo */ /* PsnsCreateBackupMethod */ /* PsnsEstimateBackupMethod */ /* */ /* Create a backup method to back up all changed */ /* files on drive D, and find out how many files */ /* would be backed up. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* First create a new backup method. */ Call PsnsCreateBackupMethod handle, 'Drive D to Pinerry' Say 'PsnsCreateBackupMethod returned' result /* Set up the backup method to do what we want. */ /* Drop the stem to be used. */ Drop methodinfo. methodinfo.0name='Drive D to Pinerry' methodinfo.0description='Backs up Drive D to backup set Pinerry' methodinfo.0subdirectories=1 methodinfo.0compression=COMPRESSION methodinfo.0generations='2' methodinfo.0useRulebook=0 methodinfo.0useFileFilter=0 methodinfo.0changedFilesOnly=1 methodinfo.0preview=0 methodinfo.0backupset='Pinerry' Call PsnsBackupMethodInfo handle, 'methodinfo' Say 'PsnsBackupMethodInfo returned' result /* Estimate the backup method. */ /* Drop the stem to be used. */ Drop estimatestem. Call PsnsEstimateBackupMethod handle, 'Drive D to Pinerry', estimatestem /* If the estimate was successful, then the data */ /* is returned. */ If result = 0 Then Do Say 'Files Folders' Say estimatestem.0files estimatestem.0folders End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRenameBackupMethod */ /* */ /* Rename backup method 'Orange' to 'Apple'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Rename the backup method. */ Call PsnsRenameBackupMethod handle, 'Orange', 'Apple' Say 'PsnsRenameBackupMethod returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsCopyBackupMethod */ /* */ /* Copy backup method 'Tango' to 'Pepsy'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Copy the backup method. */ Call PsnsCopyBackupMethod handle, 'Tango', 'Pepsy' Say 'PsnsCopyBackupMethod returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRunBackupMethod */ /* */ /* Runs backup method 'Sage'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Run the backup method. */ Call PsnsRunBackupMethod handle, 'Sage' Say 'PsnsRunBackupMethod returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsInit */ /* PsnsTerm */ /* */ /* Establish a connection to PSnS and then close */ /* it again. */ /***************************************************/ /* Check if the REXX API DLL has been loaded. */ Call RxFuncQuery 'PSNSLOADFUNCS' /* If not, it is loaded. */ If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' /* If the DLL doesn't load correctly, the program */ /* exits. */ If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End /* Load up the functions within the DLL. */ Call PSNSLOADFUNCS /* Connect to PSnS. */ Call PsnsInit 'handle', 'PIPE' /* Check it worked. (A result of 0 is successful) */ If result = 0 Then Say "Successful connection" Else Say "Unsuccessful connection" /* Disconnect */ Call PsnsTerm handle /* Check it worked. (A result of 0 is successful) */ If result = 0 Then Say "Successful disconnection" Else Say "Unsuccessful disconnection" /* Quit the program */ Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteRestoreMethod */ /* PsnsListRestoreMethods */ /* */ /* Delete restore methods which don't restore all */ /* files. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the restore methods. */ /* Drop the stem to be used. */ Call PsnsListRestoreMethods handle, 'stemmed' Say 'PsnsListRestoreMethods returned' result /* For all the restore methods with the allfiles */ /* flag false, print their name and delete them. */ Do x=1 to stemmed.0 If stemmed.x.0allFiles=0 Then Do Say stemmed.x.0name Call PsnsDeleteRestoreMethod handle, stemmed.x.0name End End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsCreateRestoreMethod */ /* PsnsEstimateRestoreMethod */ /* PsnsRestoreMethodInfo */ /* */ /* Create a restore method to restore all .cmd */ /* files to their original locations, and find out */ /* how many files would be restored. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Create a new restore method. */ Call PsnsCreateRestoreMethod handle, 'Backup cmd Files' Say 'PsnsCreateRestoreMethod returned' result /* Set up the restore method to do what we want. */ /* Drop the stem to be used. */ Drop restoreinfo. restoreinfo.0name='Backup cmd Files' restoreinfo.0description='Backs up all .cmd files' restoreinfo.0allFiles=0 restoreinfo.0drive='*' restoreinfo.0pattern='*.cmd' restoreinfo.0subdirectories=1 restoreinfo.0byDate=0 restoreinfo.0preview=0 restoreinfo.0prompt=0 restoreinfo.0originalLocation=1 restoreinfo.0backupset='*' Call PsnsRestoreMethodInfo handle, 'restoreinfo' Say 'PsnsRestoreMethodInfo returned' result /* Estimate the restore method */ /* Drop the stem to be used. */ Drop estimatestem. Call PsnsEstimateRestoreMethod handle, 'Backup cmd Files', 'estimatestem' /* If the estimate was successful, then the data */ /* is returned. */ If result = 0 Then Do Say 'Files Folders' Say estimatestem.0files estimatestem.0folders End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRenameRestoreMethod */ /* */ /* Rename restore method 'Guava' to 'Java'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Rename the restore method. */ Call PsnsRenameRestoreMethod handle, 'Guava', 'Java' Say 'PsnsRenameRestoreMethod returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsCopyRestoreMethod */ /* */ /* Copy restore method 'Cat' to 'Koala'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Copy the restore method. */ Call PsnsCopyRestoreMethod handle, 'Cat', 'Koala' Say 'PsnsCopyRestoreMethod returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRunRestoreMethod */ /* */ /* Runs restore method 'Onion'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Run the restore method. */ Call PsnsRunRestoreMethod handle, 'Onion' Say 'PsnsRunRestoreMethod returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteBackupSet */ /* PsnsListBackupSets */ /* */ /* Find all backup sets which use storage device */ /* 'Drive E', and delete them. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the backup sets. */ /* Drop the stem to be used. */ Drop backupsets. Call PsnsListBackupSets handle, 'backupsets' Say 'PsnsListBackupSets returned' result /* For all the backup sets with the storage device */ /* as 'Drive E', print their name and delete them. */ Do x=1 to backupsets.0 If backupsets.x.0storageDevice='Drive E' Then Do Say backupsets.x.0name Call PsnsDeleteBackupSet handle, backupsets.x.0name End End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsBackupSetInfo */ /* PsnsCreateBackupSet */ /* */ /* Create a backup set on storage device 'Drive E' */ /* and set its description. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Create a new backup set. */ Call PsnsCreateBackupSet handle, 'Mule', 'Drive E', 'PATH=Dodgy' Say 'PsnsCreateBackupSet returned' result /* Set the description. */ /* Drop the stem to be used. */ Drop setinfo. setinfo.0name='Mule' setinfo.0description='Contains back up of Mule project' Call PsnsBackupSetInfo handle, 'setinfo' Say 'PsnsBackupSetInfo returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsTransferBackupSet */ /* */ /* Transfer out a named backup set. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Transfer the backup set out. */ Call PsnsTransferBackupSet handle, 'Mule', 'OUT' Say 'PsnsTransferBackupSet returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsEmptyBackupSet */ /* */ /* Empty backup set 'backset'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Empty the backup set. */ Call PsnsEmptyBackupSet handle, 'backset' Say 'PsnsEmptyBackupSet returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsGetLogFile */ /* */ /* Gets the name of the log file for backup set */ /* 'Drive C(General)'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Set the name of the backup set we want the log */ /* file of. */ /* Drop the stem to be used. */ Drop stemname. stemname.0name='Drive C (General)' Call PsnsGetLogFile handle, stemname /* Give the log file name, if the request was */ /* successful. */ If result = 0 Then Say 'The log file name is' stemname.0logfile Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsGetBackupSetConfig */ /* PsnsSetBackupSetConfig */ /* */ /* Ensure that an optical backup set doesn't play */ /* a sound when requesting a volume. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Get the backup set configuration. */ /* Drop the stem to be used. */ Drop config. config.0name='RW Optical G (General)' Call PsnsGetBackupSetConfig handle, 'config' Say 'PsnsGetBackupSetConfig returned' result If result = 0 then Do Say 'The configuration string is' config.0confString End /* Now set the backup set configuration. */ Call PsnsSetBackupSetConfig handle, config.0name, 'BEEP=NO' Say 'PsnsSetBackupSetConfig returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsListVolumeBackupSets */ /* PsnsTransferIn */ /* */ /* List the backup set on an index diskette, and */ /* transfer that backup set in. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List the backup set on this storage device. */ /* Drop the stem to be used. */ Call PsnsListVolumeBackupSets handle, 'Tangerine', 0, 'Diskette A (3.5")' Say 'PsnsListVolumeBackupSets returned' result /* For each backup set listed, transfer it in */ If result = 0 Then Do x=1 to Tangerine.0 Say 'The backup set is' Tangerine.x.0backupSet Call PsnsTransferIn handle, 'Diskette A (3.5")', Tangerine.x.0backupSet Say 'PsnsTransferIn returned' result End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsCreateStorageDevice */ /* PsnsListCreatableStorageDevices */ /* */ /* List the creatable storage devices, and create */ /* a new storage device. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the creatable storage devices. */ /* Drop the stem to be used. */ Drop pear. Call PsnsListCreatableStorageDevices handle, 'pear' Say 'PsnsListCreatableStorageDevices returned' result /* For all the creatable types of storage device, */ /* print their name. */ Do x=1 to pear.0 Say pear.x.0name End /* Create the storage device now */ Call PsnsCreateStorageDevice handle, 'Hard Disk', 'DRIVE=D;PATH=S' Say 'PsnsCreateStorageDevice returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRefreshStorageDevices */ /* */ /* Refresh the list of available storage devices. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Refresh the storage devices. */ Call PsnsRefreshStorageDevices handle Say 'PsnsRefreshStorageDevices returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteStorageDevice */ /* */ /* Delete storage device 'Drive E'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Delete the storage device. */ Call PsnsDeleteStorageDevice handle, 'Drive E' Say 'PsnsDeleteStorageDevice returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsStorageDeviceInfo */ /* */ /* Find out which dynamic link library (DLL) is */ /* used by storage device 'Drive D' */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Drop the stem to be used. */ Drop tiny. tiny.0name='Drive D' Call PsnsStorageDeviceInfo handle, 'tiny' /* If the call was successful, then the data is */ /* returned. */ If result = 0 Then Do Say 'The DLL name is' tiny.0dllName End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsListStorageDevices */ /* */ /* List the storage devices, and their DLL name. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the storage devices. */ /* Drop the stem to be used. */ Drop tomato. Call PsnsListStorageDevices handle, 'tomato' Say 'PsnsListStorageDevices returned' result /* For all the storage devices, print their name */ /* and the name of the DLL used. */ Do x=1 to tomato.0 Say tomato.x.0name '*^*' tomato.x.0dllName End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsGetStorageDeviceConfig */ /* */ /* Print out the configuration string for a */ /* selected device. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Query the configuration string, and display it. */ /* Drop the stem to be used. */ Drop tomato. tomato.0storageDevice='Drive E' Call PsnsGetStorageDeviceConfig handle, 'tomato' Say 'PsnsGetStorageDeviceConfig returned' result If result=0 Then Say 'The configuration string is' tomato.0confString Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsSetStorageDeviceConfig */ /* */ /* Update the location of the ADSM options file. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Update the configuration string, and display */ /* it. */ Call PsnsSetStorageDeviceConfig handle, 'ADSM', 'MAXOBJECTS=23;' Say 'PsnsSetStorageDeviceConfig returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsListVolumeBackupSets */ /* PsnsVolumeInfo */ /* */ /* Print out space usage information for a volume, */ /* and see which backup sets are associated with */ /* it. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List the space usage for volume '1' */ /* Drop the stem to be used. */ Drop volume. Call PsnsVolumeInfo handle, 'volume', '1' Say 'PsnsVolumeInfo returned' result /* If the call was successful, then the data is */ /* returned. */ If result = 0 Then Do Say 'Total Capacity PSnS Used' Say ' ' volume.0totalCapacity ' ' volume.0psnsUsed End /* Now print out the backup sets associated */ /* with this volume. */ /* Drop the stem to be used. */ Drop info. Call PsnsListVolumeBackupSets handle, 'info', '1' /* If the call was successful, then the data is */ /* returned. */ If result = 0 then Do x=1 to info.0 Say 'Backup set' info.x.0backupSet ':' info.x.0spaceUsed End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteVolume */ /* PsnsListVolumes */ /* */ /* Find all volumes on a storage device which have */ /* no space used on them, and delete them. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the volumes. */ /* Drop the stem to be used. */ Drop list. Call PsnsListVolumes handle, 'list' Say 'PsnsListVolumes returned' result /* Check for those with no space used on them, and */ /* delete them. */ Do x=1 to list.0 If list.x.0psnsUsed < 2 then Do Say 'Deleting Backup set' list.x.0name 'with' list.x.0psnsUsed 'used' Call PsnsDeleteVolume handle, list.x.0id End End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsActivateVolume */ /* PsnsAssociateVolume */ /* PsnsCreateVolume */ /* */ /* Create a new diskette volume, associate it with */ /* backup set 'bucket' and mark it as inactive. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Create a new volume. */ Call PsnsCreateVolume handle, '3.5" Diskette' Say 'PsnsCreateVolume returned' result Say 'The ID for it is' volumeID /* Associate this volume with 'bucket' backup set */ Call PsnsAssociateVolume handle, volumeID, "bucket" Say 'PsnsAssociateVolume returned' result /* Deactivate this volume */ Call PsnsActivateVolume handle, volumeID, "DEACTIVATE" Say 'PsnsActivateVolume returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsCreateEvent */ /* PsnsEventInfo */ /* */ /* Create a new event to perform an hourly backup */ /* with backup method 'Orange'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Create the new event. */ Call PsnsCreateEvent handle, 'REGULAR', 'Orange' Say 'PsnsCreateEvent returned' result Say 'The ID of this event is' eventID /* Set up the time of the event. */ /* Drop the stem to be used. */ Drop info. info.0hours='1' info.0minutes='0' info.0changedFilesOnly='AS_METHOD' info.0showPreview='NO' info.0active='TRUE' info.0backupMethod='Orange' Call PsnsEventInfo handle, 'info', eventID Say 'PsnsEventInfo returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsActivateEvent */ /* PsnsListEvents */ /* */ /* List all events which use backup method 'Grape' */ /* and deactivate them. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the events. */ /* Drop the stem to be used. */ Drop event. Call PsnsListEvents handle, 'event' Say 'PsnsListEvents returned' result /* For all the events with 'Grape' as the name of */ /* the backup method, say their ID, and */ /* deactivate them. */ Do x=1 to event.0 If event.x.0backupMethod='Grape' Then Do Say 'Deactivating event number' event.x.0id Call PsnsActivateEvent handle, event.x.0id, 'DEACTIVATE' End End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteEvent */ /* PsnsGetNextEvent */ /* */ /* Find out which is the next event to occur, and */ /* delete it. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Get the next event to occur. */ Drop event. Call PsnsGetNextEvent handle Say 'PsnsGetNextEvent returned' result If result = 36 Then Say 'No more events' Else If result = 0 Then Do Say 'The ID of this event is' nextEventID /* Delete the event. */ Call PsnsDeleteEvent handle, nextEventID Say 'PsnsDeleteEvent returned' result End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsCopyEvent */ /* */ /* Copy event with the given ID and return the ID */ /* of the new event. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Copy the event. */ Call PsnsCopyEvent handle, '1' Say 'PsnsCopyEvent returned' result If result = 0 Then Say 'The new event ID is' newEventID Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsAddFileFilterRule */ /* PsnsCreateFileFilter */ /* PsnsFileFilterInfo */ /* */ /* Create a file filter to back up all the source */ /* files in project 'Solutions'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Create a new file filter. */ Call PsnsCreateFileFilter handle, 'Solutions data', 'LIST' Say 'PsnsCreateFileFilter returned' result /* Set the description. */ /* Drop the stem to be used. */ drop filter. filter.0description='Filter to select the data for the Solutions Project' filter.0name='Solutions data' Call PsnsFileFilterInfo handle, 'filter' Say 'PsnsFileFilterInfo returned' result /* Set up the first rule, and add it. */ /* Drop the stem to be used. */ drop rule. rule.0drive='D' rule.0directory='\s\rexxipf' rule.0pattern='*.ipf' rule.0subdirectories='1' rule.0include='1' Call PsnsAddFileFilterRule handle, 'rule', 'Solutions data', '1' Say 'PsnsAddFileFilterRule returned' result /* Add more rules */ rule.0pattern='*.cmd' Call PsnsAddFileFilterRule handle, 'rule', 'Solutions data', '1' Say 'PsnsAddFileFilterRule returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteFileFilter */ /* PsnsListFileFilters */ /* */ /* Delete all the file filters. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the file filters. */ /* Drop the stem to be used. */ Drop stem. Call PsnsListFileFilters handle, 'stem' Say 'PsnsListFileFilters returned' result /* For all the file filters, print their name and */ /* delete them. */ Do x=1 to stem.0 Say stem.x.0name 'is being deleted' Call PsnsDeleteFileFilter handle, stem.x.0name End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRenameFileFilter */ /* */ /* Rename file filter 'Source files' to 'Archive'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Rename the file filter. */ Call PsnsRenameFileFilter handle, 'Source Files', 'Archive' Say 'PsnsRenameFileFilter returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsCopyFileFilter */ /* */ /* Copy file filter 'Source files' to 'Archive'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Copy the file filter. */ Call PsnsCopyFileFilter handle, 'Source Files', 'Archive' Say 'PsnsCopyFileFilter returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsFileFilterInfo */ /* PsnsFileFilterRuleInfo */ /* */ /* Print out details of a file filter. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Look at the file filter. */ /* Drop the stem to be used. */ Drop Info. Info.0name='Data' Call PsnsFileFilterInfo handle, 'Info' Say 'PsnsFileFilterInfo returned' result /* Look at the rules of that file filter. */ /* Drop the stem to be used. */ Do x=1 to Info.0numRules Drop rule. Call PsnsFileFilterRuleInfo handle, 'rule', x, Info.0name Say rule.0drive':'rule.0directory 'using a pattern of' rule.0pattern End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteFileFilterRule */ /* PsnsListFileFilterRule */ /* */ /* Look at the first rule of a file filter, and */ /* delete it. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Look at the rule. */ /* Drop the stem to be used. */ Drop rule. Call PsnsListFileFilterRule handle, 'rule', 1, 'Current' If result = 0 Then Do Say rule.0drive':'rule.0directory 'using a pattern of' rule.0pattern End /* Delete the rule. */ Call PsnsDeleteFileFilterRule handle, 'Current', '1' Say 'PsnsDeleteFileFilterRule returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsAddRulebookRule */ /* PsnsCreateRulebook */ /* PsnsRulebookInfo */ /* */ /* Create a rulebook to keep 10 generations of all */ /* .ecu and .cmx files. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Create a new rulebook. */ Call PsnsCreateRulebook handle, 'Project Rulebook' Say 'PsnsCreateRulebook returned' result /* Set the description. */ /* Drop the stem to be used. */ drop rulebook. rulebook.0description='Rulebook to keep 10 generations of all .ecu and .cmx files.' rulebook.0name='Project Rulebook' Call PsnsRulebookInfo handle, 'rulebook' Say 'PsnsRulebookInfo returned' result /* Set up the first rule, and add it. */ /* Drop the stem to be used. */ drop rule. rule.0drive='D' rule.0directory='\' rule.0pattern='*.ecu' rule.0subdirectories='1' rule.0generations='10' rule.0compression='DEFAULT' Call PsnsAddRulebookRule handle, 'rule', 'Project Rulebook', '1' Say 'PsnsAddRulebookRule returned' result /* Add more rules */ rule.0pattern='*.cmx' Call PsnsAddRulebookRule handle, 'rule', 'Project Rulebook', '1' Say 'PsnsAddRulebookRule returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteRulebook */ /* PsnsListRulebooks */ /* */ /* Delete all the rulebooks. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the rulebooks. */ /* Drop the stem to be used. */ Drop rulebook. Call PsnsListRulebooks handle, 'rulebook' Say 'PsnsListRulebooks returned' result /* For all the rulebooks, print their name and */ /* delete them. */ Do x=1 to rulebook.0 Say rulebook.x.0name 'is being deleted' Call PsnsDeleteRulebook handle, rulebook.x.0name End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRenameRulebook */ /* */ /* Rename rulebook 'Kumquat' to 'Kiwi'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Rename the rulebook. */ Call PsnsRenameRulebook handle, 'Kumquat', 'Kiwi' Say 'PsnsRenameRulebook returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsCopyRulebook */ /* */ /* Copy rulebook 'Kiwi' to 'Pear'. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Copy the rulebook. */ Call PsnsCopyRulebook handle, 'Kiwi', 'Pear' Say 'PsnsCopyRulebook returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRulebookInfo */ /* PsnsRulebookRuleInfo */ /* */ /* Print out details of a rulebook. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Look at the rulebook. */ /* Drop the stem to be used. */ Drop Data. Data.0name='Current' Call PsnsRulebookInfo handle, 'Data' Say 'PsnsRulebookInfo returned' result /* Look at the rules of that rulebook. */ /* Drop the stem to be used. */ Do x=1 to Data.0numRules Drop rule. Call PsnsRulebookRuleInfo handle, 'rule', x, 'Current' Say rule.0drive':'rule.0directory 'using a pattern of' rule.0pattern Say rule.0generations 'generations of files are to be backed up' End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDeleteRulebookRule */ /* PsnsListRulebookRule */ /* */ /* Look at the first rule of a rulebook, and */ /* delete it. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Look at the rule. */ /* Drop the stem to be used. */ Drop rule. Call PsnsListRulebookRule handle, 'rule', 1, 'Current' If result = 0 Then Do Say rule.0drive':'rule.0directory 'using a pattern of' rule.0pattern End /* Delete the rule. */ Call PsnsDeleteRulebookRule handle, 'Current', '1' Say 'PsnsDeleteRulebookRule returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsListSourceDrives */ /* PsnsSelectSourceDrive */ /* */ /* Deselect all LAN drives for backup. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the source drives. */ /* Drop the stem to be used. */ Drop drives. Call PsnsListSourceDrives handle, 'drives' Say 'PsnsListSourceDrives returned' result /* For all the source drives which are LAN drives, */ /* print their name and deselect them. */ Do x=1 to drives.0 If drives.x.0type='LANDRIVE' & drives.x.0selected='1' Then Do Say 'Drive' drives.x.0driveLetter 'is being deselected' Call PsnsSelectSourceDrive handle, drives.x.0driveLetter, 'DESELECT' End End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsRefreshSourceDrives */ /* PsnsSourceDriveType */ /* */ /* Refresh the list of source drives, and set the */ /* type of Drive Z to be a hard disk. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Refresh the source drives. */ Call PsnsRefreshSourceDrives handle Say 'PsnsRefreshSourceDrives returned' result /* Change the type of Drive Z. */ Call PsnsSourceDriveType handle, 'Z', 'HARDDISK' Say 'PsnsSourceDriveType returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsAddFile */ /* PsnsDropFiles */ /* PsnsListFiles */ /* PsnsPurgeFiles */ /* */ /* Find all files bigger than a certain size, and */ /* drop them. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* List all the files. */ /* Drop the stem to be used. */ Drop stem. stem.0backupSet='Recovery' Call PsnsListFiles handle, 'stem' Say 'PsnsListFiles returned' result /* For all the files bigger than 1000000, print */ /* their name and add them to the list of files. */ Do x=1 to stem.0 If stem.x.0size>1000000 Then Do Say stem.x.0filename 'is being dropped from' stem.x.0backupSet Say 'and is of size' stem.x.0size Say Call PsnsAddFile handle, stem.x.0filename /* If there is problem, stop the operation. */ If result<>0 Then Do Say 'Error encountered' PsnsPurgeFiles handle End End End /* Drop the files */ Say 'About to drop files' Call PsnsDropFiles handle, 'Recovery' Say 'PsnsDropFiles returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsAddFile */ /* PsnsBackupFiles */ /* PsnsPurgeFiles */ /* */ /* Back up a selection of files. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Empty the file list for this handle. */ Call PsnsPurgeFiles handle Say 'PsnsPurgeFiles returned' result /* Add a file to the list. */ Call PsnsAddFile handle, 'D:\s\m.cmd' Say 'PsnsAddFile returned' result /* Add a directory and its contents */ Call PsnsAddFile handle, 'D:\s\backup\' Say 'PsnsAddFile returned' result /* Add a directory and all files & directories */ /* below it. */ Call PsnsAddFile handle, 'D:\s\psnstemp\*\' Say 'PsnsAddFile returned' result /* Fill in some details for the backup method. */ /* Drop the stem to be used. */ Drop files. files.0backupSet='Monday' files.0compression='COMPRESSION' files.0generations='3' files.0changedFilesOnly='0' /* Back up the files. */ Call PsnsBackupFiles handle, 'files' Say 'PsnsBackupFiles returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsAddFile */ /* PsnsPurgeFiles */ /* PsnsRestoreFiles */ /* */ /* Restores a selection of files. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Empty the file list for this handle. */ Call PsnsPurgeFiles handle Say 'PsnsPurgeFiles returned' result /* Add a file to the list. */ Call PsnsAddFile handle, 'D:\s\m.cmd' Say 'PsnsAddFile returned' result /* Add a directory and its contents */ Call PsnsAddFile handle, 'D:\s\backup\' Say 'PsnsAddFile returned' result /* Add a directory and all files & directories */ /* below it. */ Call PsnsAddFile handle, 'D:\s\psnstemp\*\' Say 'PsnsAddFile returned' result /* Fill in some details for the restore method. */ /* Drop the stem to be used. */ Drop files. files.0backupSet='Monday' /* Restore the files. */ Call PsnsRestoreFiles handle, 'files' Say 'PsnsRestoreFiles returned' result Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsGetMessageText */ /* */ /* Print out the message corresponding to an API */ /* error code. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Print out the error message. */ Call PsnsGetMessageText handle, 'error', 45 Say 'PsnsGetMessageText returned' result Say 'The error message is' error Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsDefaultsInfo */ /* PsnsListDefaults */ /* */ /* Change some of the defaults, and then print out */ /* the defaults. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Change some of the defaults. */ /* Drop the stem to be used. */ Drop defaults. defaults.0generations='3' defaults.0rulebook='A' defaults.0backupSet='Recovery' defaults.0fileFilter='Data' Call PsnsDefaultsInfo handle, 'defaults' Say 'PsnsDefaultsInfo returned' result /* Print out all the defaults. */ /* Drop the stem to be used. */ Drop current. Call PsnsListDefaults handle, 'current' Say 'PsnsListDefaults returned' result If result = 0 Then Do Say 'Default compression setting is' current.0compression Say 'Default number of generations is' current.0generations Say 'Default rulebook name is' current.0rulebook Say 'Default file filter name is' current.0filefilter Say 'Default backup set is' current.0backupSet End Call PsnsTerm handle Exit ═══ Example ═══ /* PSnS REXX example program. */ /***************************************************/ /* Functions used: */ /* PsnsListSettings */ /* PsnsSettingsInfo */ /* */ /* Change some of the settings, and then print out */ /* the settings. */ /***************************************************/ Call RxFuncQuery 'PSNSLOADFUNCS' If result = 1 Then Do Call RxFuncAdd 'PSNSLOADFUNCS', 'PSNSREXX', 'PSNSLOADFUNCS' If result <> 0 Then Do Say "Could not load the rexxapi dll" Exit End End Call PSNSLOADFUNCS Call PsnsInit 'handle', 'PIPE' /* Change some of the settings. */ /* Drop the stem to be used. */ Drop settings. settings.0manualPriority='HIGH' settings.0autoPriority='HIGH' settings.0tempPath='E:\PSNS' settings.0flags='10001' settings.0logFileLimit='500' settings.0backupExit='D:\S\m.cmd' settings.0restoreExit='D:\s\rexxipf\m.cmd' settings.0enableACLBackup='0' Call PsnsSettingsInfo handle, 'settings' Say 'PsnsSettingsInfo returned' result /* Print out all the settings. */ /* Drop the stem to be used. */ Drop present. Call PsnsListSettings handle, 'present' Say 'PsnsListSettings returned' result If result = 0 Then Do Say 'Manual priority setting is' present.0manualPriority Say 'Auto priority setting is' present.0autoPriority Say 'Temporary path is' present.0tempPath Say 'Flags are' present.0flags Say 'Log file limit is' present.0logFileLimit Say 'Backup exit is' present.0backupExit Say 'Restore exit is' present.0restoreExit Say 'ACL Backup status is' present.0enableACLBackup End Call PsnsTerm handle Exit ═══ 6. Backup methods ═══ The main way to back up files with OS/2 Warp Server Backup/Restore is by using backup methods. A backup method tells OS/2 Warp Server Backup/Restore which files you want to back up, how you want to back them up and to where you want to back them up. The following sections tell you how to create, manipulate and run backup methods.  Working with backup methods  Running and estimating backup methods ═══ 6.1. Working with backup methods ═══ You can create a backup method using the REXX API by calling the function PsnsCreateBackupMethod. This creates a new backup method with the given name. The backup method is created with default settings; you should change these with PsnsBackupMethodInfo to make the backup method perform the task you want. To rename, copy and delete backup methods, use the functions PsnsRenameBackupMethod, PsnsCopyBackupMethod and PsnsDeleteBackupMethod. To inspect or change the settings, and see descriptions of what they do, use the function PsnsBackupMethodInfo. This function takes as its argument a REXX stemname, which contains the backup method name, and the potential settings to change. Any compound variable which is given a value is changed. To list all the backup methods, use PsnsListBackupMethods. This works in the same way as all the other API listing functions. ═══ 6.2. Running and estimating backup methods ═══ The main way to back up files with OS/2 Warp Server Backup/Restore is by running a backup method. To do this, use the function PsnsRunBackupMethod. This function takes as its argument the name of the backup method. To get information about how many files and folders would be backed up by a backup method but without actually running the backup, use PsnsEstimateBackupMethod. This tells OS/2 Warp Server Backup/Restore to scan the source drives and work out which files need to be backed up, and then return the results in a REXX compound variable, along with the estimated time for the backup, based on performance in previous backups to the same storage device. Note that the first time you use a storage device, the estimated time will be 0 since there are no previous backups on which to base the estimate. ═══ 7. Restore methods ═══ The main way to restore files with OS/2 Warp Server Backup/Restore is by using restore methods. A backup method tells OS/2 Warp Server Backup/Restore which files you want to restore, to where you want to restore them, and how to choose which generation will be restored. The following sections tell you how to create, manipulate and run restore methods.  Working with restore methods  Running and estimating restore methods ═══ 7.1. Working with restore methods ═══ You can create a restore method using the REXX API by calling the function PsnsCreateRestoreMethod. This creates a new restore method with the given name. The restore method is created with default settings; you should change these with PsnsRestoreMethodInfo to make the restore method perform the task you want. To rename, copy and delete restore methods, use the functions PsnsRenameRestoreMethod, PsnsCopyRestoreMethod and PsnsDeleteRestoreMethod. To inspect or change the settings, and see descriptions of what they do, use the function PsnsRestoreMethodInfo. This function takes as its argument a REXX stemname, which contains the restore method name, and the potential settings to change. Any compound variable which is given a value is changed. To list all the restore methods, use PsnsListRestoreMethods. This works in the same way as all the other API listing functions. ═══ 7.2. Running and estimating restore methods ═══ The main way to restore files with OS/2 Warp Server Backup/Restore is by running a restore method. To do this, use the function PsnsRunRestoreMethod. This function takes as its argument the name of the restore method. To get information about how many files and folders would be restored by a restore method but without actually running the restore, use PsnsEstimateRestoreMethod. This tells OS/2 Warp Server Backup/Restore to scan the backup set and work out which files would need to be restored, and then return the results in a REXX compound variable, along with the estimated time for the restore, based on performance in previous restores to the same storage device. Note that the first time you use a storage device, the estimated time will be 0 since there are no previous restores on which to base the estimate. ═══ 8. Backup sets ═══ A backup set is where data is stored by OS/2 Warp Server Backup/Restore A backup set is associated with a particular storage device and may contain more than one physical volume of backed-up data. The following section tell you how to create and manipulate backup sets.  Working with backup sets ═══ 8.1. Working with backup sets ═══ You can create a backup set with the REXX API by calling the function PsnsCreateBackupSet. You must specify a storage device with which to associate the backup set. The backup set is created with a default configuration, which should be sufficient in most cases. To delete a backup set, use PsnsDeleteBackupSet. Note: When you delete a backup set, all backed-up data on it is lost! To empty the backup set of data without deleting the backup set itself, use PsnsEmptyBackupSet. To change the description of a backup set, or to inspect the description and find out what storage device it is associated with, use PsnsBackupSetInfo. This function takes as its argument a REXX stemname, which contains the potential settings to change. Other backup set settings depend on the storage device which the backup set uses, and so are set and queried using a configuration string. Use the functions PsnsGetBackupSetConfig and PsnsSetBackupSetConfig to get and set the configuration string for a backup set. For more information, see Storage Device configuration. To list all the backup sets, use PsnsListBackupSets. This works in the same way as all the other API listing functions. Backup sets can be transferred out, which means that OS/2 Warp Server Backup/Restore writes all index data to the backup set media and then will not use the backup set for any more backups or restores until it is transferred in again. This is useful for moving backup sets between machines, for example. To transfer a backup set in or out, use PsnsTransferBackupSet. This function takes as arguments the name of the backup set and a flag specifying whether the backup set is to be transferred in or out. In order to transfer in a "forgotten" backup set, use the function PsnsTransferIn. Each backup set has a log file which is a text file containing a log of activity performed on that backup set. To find the name of the log file for a backup set, use the function PsnsGetLogFile. You can then, for example, view, process or delete the log file. Dual device backup sets can be also be created with the PsnsCreateBackupSet function. These allow you to perform an initial backup to one storage device, then further backups to an incremental device. The storage device to which you perform the initial backup is known as the base device. You may specify the virtual device only as the base storage device of a dual device backup set. ═══ 9. Storage devices ═══ Storage devices are the physical systems OS/2 Warp Server Backup/Restore uses to store backed-up data, such as tape drives, hard disks or ADSM servers. The following sections tell you how to create and manipulate storage devices.  Creating a storage device  Working with storage devices ═══ 9.1. Creating a storage device ═══ When a new storage device is created, it must be one of a number of available types; these are the names which appear when you select 'New' from the pop-up menu in the Storage Devices container in the OS/2 Warp Server Backup/Restore user interface. To accomplish this using the API, you can find out the available types of storage devices to create by calling PsnsListCreatableStorageDevices. This will list all creatable storage devices You can then call PsnsCreateStorageDevice which takes as an argument the name of the creatable storage device from which to create the new storage device. You must also specify a configuration string when you create a storage device, since there are some configuration options which can only be specified when a device is created and cannot be changed afterwards; for more information see Storage Device configuration. ═══ 9.2. Working with storage devices ═══ Storage device settings depend on the individual storage device, so they are set using a configuration string. For more information on configuration strings, see Storage Device configuration. Use the functions PsnsGetStorageDeviceConfig and PsnsSetStorageDeviceConfig to get and set the storage device configuration. To find out which Dynamic Link Library (DLL) file a storage device uses, call PsnsStorageDeviceInfo. This function takes as its argument a REXX stemname, into which the DLL name is put. To list all the storage devices, use PsnsListStorageDevices. This works in the same way as all the other API listing functions. OS/2 Warp Server Backup/Restore usually scans for new storage devices automatically when it is started up. To perform this task manually, use the function PsnsRefreshStorageDevices. ═══ 10. Volumes ═══ Volumes are the individual tapes, diskettes or cartridges on which backed-up data is stored. OS/2 Warp Server Backup/Restore keeps track of which files are stored on which volumes, and how much space is used up on each volume; this means that the user does not have to worry about remembering exactly where their data is. The following section tells you how to create and manipulate volumes.  Working with volumes ═══ 10.1. Working with volumes ═══ Volumes are referred to by their volume ID, which is an unsigned long integer. Creating a volume involves formatting and labelling the volume. Before you can create a volume using the API, you should ensure that the correct tape or diskette is already in the drive. When creating a volume under the graphical environment, the user is asked to insert the correct tape or diskette before formatting, but since this cannot be done when running under the API it is assumed that the correct media is already in the drive. To create a volume, call the function PsnsCreateVolume. Note: Creating a volume will erase all data from the media currently in the drive. You should not have an existing volume in the drive when you call this function; always empty the backup set or delete the volume if you wish to re-use it. To delete a volume, use the function PsnsDeleteVolume. This will make OS/2 Warp Server Backup/Restore forget about all backed-up data on the volume. You should not use this function as a regular part of your storage management, but only in circumstances such as when you have lost a tape and want to let OS/2 Warp Server Backup/Restore know this. To get information about a volume, use PsnsVolumeInfo. This takes as arguments a volume ID and a REXX stemname. Information about the volume and its space usage is returned in REXX compound variables. To list volumes and to list backup sets on a volume, use the functions PsnsListVolumes and PsnsListVolumeBackupSets. These work in the same way as the other API listing functions. It is possible to deactivate a volume; in this state, the volume will not be used for backups or restores. You could do this if the volume is unavailable and you do not want OS/2 Warp Server Backup/Restore to request it when performing a backup. To deactivate or activate a volume, use the function PsnsActivateVolume. When a volume is first created, it is not associated with any particular backup set and so will not be used for backup. Before the volume can be used, you must associate it with a backup set; this can be done with the API by calling PsnsAssociateVolume. ═══ 11. Events ═══ OS/2 Warp Server Backup/Restore allows you to schedule events which will run a backup method at a particular time. The following section tells you how to create and manipulate scheduled events.  Working with events ═══ 11.1. Working with events ═══ There are five different types of scheduled events in OS/2 Warp Server Backup/Restore:  Interval or regular events. These events happen at regular intervals in time, for example every hour or every ten minutes.  Daily events. These happen at a certain time each day.  Monthly events. These happen at a certain time on a certain day of each month.  Named day(s) events. These happen at a certain time on some days of each month. You can select individually on which days of the week and in which weeks of the month the event will occur.  Startup events. These occur a fixed time after starting up OS/2 Warp Server Backup/Restore. Events are referred to by an event ID, which is an unsigned short integer. They do not have names. To create an event, call PsnsCreateEvent. You must specify the type of the event and the name of a backup method. The backup method can be changed later but you must supply one when creating an event since there is no sensible default option. A new event ID will be created and returned. To delete an event, use PsnsDeleteEvent. To copy an event, use PsnsCopyEvent. A new event ID will be created and returned. To get or set the information about an event, use PsnsEventInfo. This function takes as arguments an event ID, and a REXX stemname. Any compound variable that is given a value, will be changed. For more information, see PsnsEventInfo. To list all the event, use PsnsListEvents. This works in the same way as the other API listing functions. To find out which event is due to occur next, use PsnsGetNextEvent. Events can be deactivated so that they will not occur; for example, you may want to deactivate a regular backup during a holiday or during system maintenance. To activate or deactivate an event, use the function PsnsActivateEvent. ═══ 12. File filters ═══ File filters allow you to automatically select files to be backed up. The following section tells you how to create and manipulate file filters.  Working with file filters  Working with file filter rules ═══ 12.1. Working with file filters ═══ In the OS/2 Warp Server Backup/Restore graphical user interface, there are two types of file filters: tree-based and rule-based filters. In fact all file filters are stored internally as rule-based filters, so this is how they are accessed using the API. To create a file filter, use the function PsnsCreateFileFilter. You must specify a name for the file filter and the type of the filter. The type you specify only changes how the file filter is edited under the graphical user interface; it does not alter how the file filter appears under the API. The file filter is created with one rule in it; this is the 'last' rule which matches all files not matched by any other rules. To delete, rename and copy file filters, use the functions PsnsDeleteFileFilter, PsnsRenameFileFilter and PsnsCopyFileFilter. To inspect or change the settings of a file filter, use the function PsnsFileFilterInfo. This function takes as its argument a stemname. Any compound variable which is given a value is changed. To list all the file filters , use PsnsListFileFilters. This works in the same way as the other API listing functions. ═══ 12.2. Working with file filter rules ═══ A file filter rule specifies which files it matches and whether they should be included or excluded from the backup. When a file is tested to see whether it should be backed up or not, it is matched against all of the rules in turn, starting from the first one. When a rule is found which matches the file, that rule is used to decide whether the file should be backed up or not. Every file filter contains one rule, which is always last, which matches all files not selected by any other rules. You cannot delete this rule or change it except to change whether the files are to be included or excluded. To add a rule to a file filter, use PsnsAddFileFilterRule. This takes as arguments the name of a file filter, a REXX stemnanme, and an integer which specifies where in the file filter the rule is to be added; use 1 to add the rule at the top of the list of rules in the file filter, 2 to add it in second place and so on. To delete a rule from a file filter, use PsnsDeleteFileFilterRule. You cannot delete the 'last' rule in a file filter. To inspect or change the settings for a file filter rule, use the function PsnsFileFilterRuleInfo. This function takes as arguments a file filter name, a REXX stemname and an integer mask. Any compound variable which is given a value is changed. For more information, see PsnsFileFilterRuleInfo. ═══ 13. Rulebooks ═══ Rulebooks allow you to use rules to decide how many generations of a file should be backed up and whether or not compression should be used. The following section tells you how to create and manipulate rulebooks.  Working with rulebooks  Working with rulebook rules ═══ 13.1. Working with rulebooks ═══ To create a rulebook, use the function PsnsCreateRulebook. The rulebook is created with one rule in it; this is the 'last' rule which matches all files not matched by any other rules. To delete, rename and copy rulebooks, use the functions PsnsDeleteRulebook, PsnsRenameRulebook and PsnsCopyRulebook. To inspect or change the settings, use the function PsnsRulebookInfo. This function takes as its argument a REXX stemname. Any compound variable which is given a value is changed. For more information, see PsnsRulebookInfo. To list all the rulebooks , use PsnsListRulebooks. This works in the same way as the other API listing functions. ═══ 13.2. Working with rulebook rules ═══ A rulebook rule specifies which files it matches, how many generations to keep and whether or not compression should be performed on the files. When a file is tested to see whether it should be backed up or not, it is matched against all of the rules in turn, starting from the first one. When a rule is found which matches the file, that rule is used to decide the number of generations and compression to use for that file. Every rulebook contains one rule, which is always last, which matches all files not selected by any other rules. You cannot delete this rule or change it except to change the number of generations and compression. To add a rule to a rulebook, use PsnsAddRulebookRule. This takes as arguments the name of a rulebook, a REXX stemname, and an integer which specifies where in the rulebook the rule is to be added; use 1 to add the rule at the top of the list of rules in the rulebook, 2 to add it in second place and so on. To delete a rule from a rulebook, use PsnsDeleteRulebookRule. You cannot delete the 'last' rule in a rulebook. To inspect or change the settings for a rulebook rule, use the function PsnsRulebookRuleInfo. This function takes as arguments a rulebook name, a REXX stemname, and an integer which specifies which rule to look at. Any compound variable which is given a value is changed. For more information, see PsnsRulebookRuleInfo. ═══ 14. Source drives ═══ OS/2 Warp Server Backup/Restore keeps a list of all drives on your system to decide where it should look for files to back up. The following section tells you how to manipulate source drives.  Working with source drives ═══ 14.1. Working with source drives ═══ OS/2 Warp Server Backup/Restore keeps a list of all drives on your system. When you do a backup which specifies that files should be backed up from all drives, this list is used to decide which drives should be checked for files to back up. For example, you might want to back up files from your local hard disks but not from your network drives. To list all the source drives which OS/2 Warp Server Backup/Restore knows about, use PsnsListSourceDrives. This works in the same way as the other API listing functions. To select or deselect a source drive for backup, use PsnsSelectSourceDrive. When you start up OS/2 Warp Server Backup/Restore, it scans to see what drives are attached to your system. To do this again manually, use the function PsnsRefreshSourceDrives. To change the type of a source drive if it has been incorrectly detected, use PsnsSourceDriveType. ═══ 15. Files ═══ The following two sections tell you about dealing with individual files.  Working with backed-up data  Working with lists of individual files ═══ 15.1. Working with backed-up data ═══ Data is stored in a backup set as a series of generations of files. Each time you back up a file, a new generation is created, and an old generation might be dropped. While you are listing backed-up data, you cannot perform any other operations on the backup set; you must wait until the listing operation is finished. To remove files from the backup set, use PsnsDropFiles. ═══ 15.2. Working with lists of individual files ═══ In addition to backing up and restoring files using backup methods and restore methods, it is also possible to back up or restore a specific list of files; this is useful for working with individual files on a one-off basis. If, however, you plan to back up or restore the same files regularly, you should use a backup or restore method. To perform operations on a list of files, you must first tell OS/2 Warp Server Backup/Restore whicb files you want to work on. To do this, call PsnsAddFile once for every file or group of files you want to add to the list. This does not actually do anything to the files, it simply remembers them. Afterwards, use PsnsBackupFiles, PsnsRestoreFiles or PsnsDropFiles to work with the files. To empty the list without performing any operations on the files, use PsnsPurgeFiles. ═══ 16. Object names ═══ Object names in OS/2 Warp Server Backup/Restore can contain any printable text character, except that:  They may not begin with a space  They may not begin with a < (less than) sign  They must be at least one character long ═══ 17. Wildcards ═══ Some fields, especially when searching for objects in OS/2 Warp Server Backup/Restore, may contain wildcards. When searching for object names and any other string apart from fully qualified filenames, the asterisk character (*) may be used to match any sequence of characters. In fully qualified filenames, wildcards may be used as follows:  The drive letter may be *, which means look for files on all drives.  The path may end with \*\, meaning look in all subdirectories of the named directory.  The filename may contain one or more asterisks (*) which act as usual wildcards. ═══ 18. Listing functions ═══ There are many functions in the OS/2 Warp Server Backup/Restore API for listing objects of various sorts. They all work in a similar way:  Each function that needs data returned to it is called with a REXX stemname, it is into this stemname that the information will be put. The API attaches, onto the end of the stemname, a period (.), then a number referring to which number in the list that item is, another period (.), and then the name of the item being returned. This leaves the user, with something like this: stemname.2.0description The value can then be printed out from REXX, and loops set up to look at all the components. To aid this, the number of items in each list, is returned in stemname.0. The name of the return item is preceded by a 0, so that it is not mistaken for a REXX variable. ═══ 19. Storage device and backup set configuration ═══ The configuration of storage devices and backup sets is done by means of configuration strings, the contents of which are specific to the storage device. A configuration string consists of a series of keywords and values, separated by semicolons (;), for example: BEEP=YES;VERIFY=NO; The caret (^) can be used as an escape character if either semicolons or equals signs are required in a value. A value may also be enclosed in either single or double quotation marks; the caret can be used as an escape character if a quotation mark is required within a quoted string. A value must be enclosed in quotation marks if leading or trailing space characters are required. In order to include a caret in a value, 2 consecutive caret characters should be used. Storage devices require a configuration string when they are created with PsnsCreateStorageDevice; once created, their configuration string can be obtained with PsnsGetStorageDeviceConfig. Some storage devices, for example the ADSM device, can be reconfigured, using PsnsSetStorageDeviceConfig. It is possible to supply a configuration string when creating a backup set using PsnsCreateBackupSet, but this is optional. Once created, a backup set's configuration string can be obtained with PsnsGetBackupSetConfig; backup sets on some types of storage device may be reconfigured using PsnsSetBackupSetConfig. The following sections describe the format of configuration strings for the standard storage devices. ═══ 19.1. SCSI tape storage devices ═══ These sections describe configuration strings for SCSI tape storage devices and backup sets.  Storage device configuration  Backup set configuration ═══ 19.1.1. Storage device configuration ═══ The following keywords are supported: ADAPTER Meaning The number of the SCSI adapter to which the tape drive is attached. Valid values A valid SCSI adapter number. This keyword must be supplied when creating a storage device. PUN Meaning The SCSI Physical Unit Number (PUN) of the tape drive. Valid values A valid PUN. This keyword must be supplied when creating a storage device. For example: PsnsCreateStorageDevice handle, "SCSI tape drive", "ADAPTER=2;PUN=3;" SCSI tape storage devices cannot be reconfigured. ═══ 19.1.2. Backup set configuration ═══ The following keywords are supported: CHECKDRIVE Meaning If you select this option then OS/2 Warp Server Backup/Restore will check the drive for a suitable volume before it prompts you to insert a tape. This option is useful when you are performing unattended backups. Valid values YES or NO This keyword is optional when creating a backup set: if it is absent, the user will always be prompted to insert a tape, even if the required volume is already in the drive. BEEP Meaning Whether OS/2 Warp Server Backup/Restore should make a noise when it asks for a tape volume to be inserted. Valid values YES or NO This keyword is optional when creating a backup set: if it is absent, a noise will not be made. For example: PsnsSetBackupSetConfig handle, "niceName", "CHECKDRIVE=YES;BEEP=NO;" SCSI tape backup sets can be reconfigured. ═══ 19.2. Diskette and RW optical storage devices ═══ These sections describe configuration strings for diskette and RW optical storage devices and backup sets.  Storage device configuration  Backup set configuration ═══ 19.2.1. Storage device configuration ═══ The following keywords are supported: DRIVE Meaning The letter of the drive which the storage device is to use for backup. Valid values A drive letter. This keyword must be supplied when creating a storage device. INDEXDRIVE (Optical only) Meaning The letter of the drive which the storage device is to use to back up index files. Valid values A diskette drive letter. This keyword is optional when creating a storage device: if it is absent, drive A will be used. For example: PsnsCreateStorageDevice handle, "RW Optical", "DRIVE=F;INDEXDRIVE=A" Diskette and RW optical storage devices cannot be reconfigured. ═══ 19.2.2. Backup set configuration ═══ The following keywords are supported: BACKUPINDEX Meaning Whether OS/2 Warp Server Backup/Restore should automatically back up its index files using index diskettes. Valid values YES or NO This keyword is optional when creating a backup set: if it is absent, index files will be backed up. BEEP Meaning Whether OS/2 Warp Server Backup/Restore should make a noise when it asks for a diskette or RW optical disk to be inserted. Valid values YES or NO This keyword is optional when creating a backup set: if it is absent, a noise will be made. VERIFY Meaning Whether OS/2 Warp Server Backup/Restore should confirm that the data written to diskette or RW optical disk is correct. Valid values YES or NO This keyword is optional when creating a backup set: if it is absent, backups will be verified. For example: PsnsSetBackupSetConfig handle, "niceName", "BEEP=NO;VERIFY=YES" Diskette and RW optical backup sets can be reconfigured. ═══ 19.3. ADSM storage devices ═══ These sections describe configuration strings for ADSM storage devices and backup sets. Note: ADSM storage devices cannot be created using PsnsCreateStorageDevice. Instead one is automatically created on installation, and this can then be edited if necessary.  Storage device configuration  Updating the ADSM options file  Backup set configuration ═══ 19.3.1. Storage device configuration ═══ The following keywords are supported: OPTIONSFILE Meaning The name of the ADSM options file to be used when connecting to the ADSM server, or the name of the file to be used to set the initial values for the ADSM options file when the NEWOPTIONSFILE keyword is also specified. The ADSM options file must exist and contain valid options before a connection with the ADSM server may be successfully established. The options file may be updated using special keywords in the configuration string. Valid values The name of an existing ADSM options file. This keyword is optional. If it is absent when creating the storage device, a default file name will be used. If it is absent when updating the storage device, the name of the options file will not be changed. NEWOPTIONSFILE Meaning The name of the ADSM options file to be used when connecting to the ADSM server. The file will be created if it does not already exist; any existing file of the same name will be replaced. The initial option values for the new options file depend on the value of the OPTIONSFILE keyword: OPTIONSFILE=filename The initial values will be taken from filename. OPTIONSFILE= There will be no initial values. OPTIONSFILE not specified The initial values will be taken from the options file specified in the existing ADSM storage device settings. Values in the options file may be set or updated using special keywords in the configuration string. Valid values A valid file name This keyword is optional. If it is absent, the name of the ADSM options file to be used is determined by the value of the OPTIONSFILE keyword and no new options file will be created. NODENAME Meaning The node name to be used for connection to the ADSM server. Valid values A valid ADSM node name; this node name must be registered at the ADSM server before a connection may be successfully established. This keyword is optional. If it is absent when creating the storage device, a default node name will be used. If it is absent when updating the storage device, the node name will not be changed. MGMTCLASS Meaning This is the ADSM management class to be used for backing up objects from OS/2 Warp Server Backup/Restore. This management class must be known at the ADSM server to which you will connect, and must be defined within the active policy set of the policy domain which is associated with your node. If you do not specify a management class, or if the management class is not defined within your active policy set, the default management class for your node will be used. If you set the management class to be mgmt_class, a statement of the form: INCLUDE * mgmt_class is inserted into your ADSM options file. Valid values A valid ADSM management class name. This keyword is optional. If it is absent when creating the storage device, the default management class for your node will be used. If it is absent when updating the storage device, the management class name will not be changed. MAXOBJECTS Meaning When OS/2 Warp Server Backup/Restore is backing up objects to an ADSM server, several objects may be sent to ADSM in a single batch; each batch is a single ADSM transaction. Each object (file or directory) that you back up using OS/2 Warp Server Backup/Restore may actually be stored in ADSM as several ADSM objects; for example, if a file has extended attributes, the file and its extended attributes may actually be stored as 2 separate ADSM objects. You can use this setting to limit the number of OS/2 Warp Server Backup/Restore objects that are included in a batch (the corresponding number of ADSM objects may be greater). Note: ADSM also has a limit on the number of its objects that can be stored in a single transaction. The number of OS/2 Warp Server Backup/Restore objects actually sent in a batch will be less than the number specified by MAXOBJECTS if the corresponding number of ADSM objects to be stored exceeds the limit set by ADSM. Valid values A non-zero numeric value This keyword is optional. If it is absent when creating the storage device, a default value will be used. If it is absent when updating the storage device, the setting will not be changed. PASSWORDLIFE Meaning If a password is required to access the services of ADSM, OS/2 Warp Server Backup/Restore will prompt you to enter your password the first time you attempt to use the services of ADSM in each use of OS/2 Warp Server Backup/Restore. If you use the services of ADSM more than once in a single use of OS/2 Warp Server Backup/Restore, OS/2 Warp Server Backup/Restore will not ask you to enter your password again until the number of minutes specified by PASSWORDLIFE has passed. Valid values A non-zero numeric value. This keyword is optional. If it is absent when creating the storage device, a default value will be used. If it is absent when updating the storage device, the setting will not be changed. PASSWORDPROMPT Meaning Whether OS/2 Warp Server Backup/Restore should prompt for entry of the ADSM password when connecting to the ADSM server during unattended operation. Note: If entry of the ADSM password is required during unattended operation and password prompting has been suppressed (PASSWORDPROMPT=NO), the operation will fail. The requirement for entry of the ADSM password can be avoided by using the option 'PASSWORDACCESS GENERATE' in the ADSM options file, or by setting the ADSM password by use of the PASSWORD keyword in the ADSM storage device configuration string. Valid values YES or NO This keyword is optional. If it is absent when creating the storage device, prompting for the ADSM password during unattended operation will not be suppressed. If it is absent when updating the storage device, the setting will not be changed. PASSWORD Meaning This keyword may be used to set the ADSM password for the current execution of the API server; the value will not be retained for future invocations of the server. Valid value The correct password for the ADSM node name associated with the ADSM storage device. This keyword is optional. If it is absent, no password will be set. NEWPASSWORD Meaning This keyword may be used to change the ADSM password. Note: The current password must also be specified by the PASSWORD keyword, unless the option 'PASSWORDACCESS GENERATE' is included in the ADSM options file and the current password is stored locally by ADSM (in encrypted form). Valid value A valid ADSM password. This keyword is optional. If it is absent, the password will not be changed. CONNECT Meaning Whether OS/2 Warp Server Backup/Restore should test the connection to the ADSM server. Valid values YES or NO This keyword is optional. If it is absent, the connection to the ADSM server will not be tested. For example: PsnsSetStorageDeviceConfig handle, "ADSM", "OPTIONSFILE=C:\\ADSM\\DSM.OPT;NODENAME=PSNSclient" ═══ 19.3.2. Updating the ADSM options file ═══ The ADSM storage device configuration string can contain special keywords (In addition to the standard OS/2 Warp Server Backup/Restore configuration string syntax) in order to add, change or delete options in the ADSM options file. ADSM options may be added or changed by including specifications of the form: +option value where: option is the name of an ADSM option to be added to, or changed, in the ADSM options file. value is the value to be set for the ADSM option. Or: -option where: option is the name of an ADSM option to be deleted from the ADSM options file. Note: No validation of the ADSM option name or value is performed. For example: PsnsSetStorageDeviceConfig handle, "ADSM", "OPTIONSFILE=C:\\ADSM\\DSM.OPT;" \ "NEWOPTIONSFILE=C:\\ADSM\\PSNS.OPT;" \ "-verbose; +quiet;" \ "+PASSWORDACCESS GENERATE;-PASSWORDDIR;" \ "+COMMMETHOD TCPIP;" \ "+TCPPort 1500;" \ "+TCPServeraddress n.n.n.n;" \ "+TCPBuffsize 8;" \ "+TCPWindowsize 16" ═══ 19.3.3. Backup set configuration ═══ ADSM backup sets have no configurable settings. ═══ 19.4. Hard disk and remote disk storage devices ═══ These sections describe configuration strings for hard disk and remote disk storage devices and backup sets.  Storage device configuration  Backup set configuration ═══ 19.4.1. Storage device configuration ═══ DRIVE Meaning The letter of the drive which the storage device is to use for backup. Valid values A drive letter. This keyword must be supplied when creating a storage device. PATH Meaning The name of the directory in which the storage device will store backed up data. Valid values A valid directory name. The directory must exist. This keyword is optional when creating a storage device: if it is absent, the directory PSNS5BKP will be used. For example: PsnsCreateStorageDevice handle, "Hard Disk", "DRIVE=D;PATH=BACKUP" Hard and remote disk storage devices cannot be reconfigured. ═══ 19.4.2. Backup set configuration ═══ The following keyword is supported: PATH Meaning The directory under the storage device's directory which the backup set will use to store data. Valid values A valid directory name. The directory must exist. This keyword is optional when creating a backup set: if it is absent, a name will be generated from the name of the backup set. For example: PsnsCreateBackupSet handle, "coolName", "Hard Disk", "PATH=LLAMA" Hard and remote disk backup sets cannot be reconfigured. ═══ 19.5. LAN alias storage devices ═══ These sections describe configuration strings for LAN alias storage devices and backup sets.  Storage device configuration  Backup set configuration ═══ 19.5.1. Storage device configuration ═══ The following keywords are supported: SERVER Meaning The name of the LAN server on which the device is to store data. Valid values The name of a LAN server. This keyword must be supplied when creating a storage device. ALIAS Meaning The name of the alias on the server on which the device is to store data. Valid values A LAN server alias This keyword must be supplied when creating a storage device. PATH Meaning The name of the directory in which the storage device will store backed up data. Valid values A valid directory name. The directory must exist. This keyword is optional when creating a storage device: if it is absent, the directory PSNS5BKP will be used. For example: PsnsCreateStorageDevice handle, "Lan Alias", "SERVER=WDGSRV;ALIAS=PSNS" LAN alias storage devices cannot be reconfigured. ═══ 19.5.2. Backup set configuration ═══ The following keyword is supported: PATH Meaning The directory under the storage device's directory which the backup set will use to store data. Valid values A valid directory name. The directory must exist. This keyword is optional when creating a backup set: if it is absent, a name will be generated from the name of the backup set. For example: PsnsCreateBackupSet handle, "coolName", "Diskette", "PATH=LLAMA" LAN alias backup sets cannot be reconfigured. ═══ 19.6. Removable drive storage device ═══ These sections describe configuration strings for the removable drive storage device and backup sets. ═══ 19.6.1. Storage device configuration ═══ DRIVE Meaning The letter of the drive which the storage device is to use for backup. Valid values A drive letter. This keyword must be supplied when creating a storage device. PATH Meaning The name of the directory in which the storage device will store backed up data. Valid values A valid directory name. The directory must exist. This keyword is optional when creating a storage device. If it is absent, the directory PSNS6BKP will be used. For example: PsnsCreateStorageDevice handle, "Removable Drive", "DRIVE=D;PATH=BACKUP" Removable Drive storage devices cannot be reconfigured. ═══ 19.6.2. Backup set configuration ═══ The following keywords are supported: BACKUPINDEX Meaning If you select this option, OS/2 Warp Server Backup/Restore will automatically back up its Index Files for the Backup Set every time you perform a backup. Warning: If the Back up index files option is not selected then no back ups are made of the Index Files. This is strongly discouraged, as it means your data will be impossible to retrieve if the Index Files on Hard Disk are lost. Valid values YES or NO This keyword is optional when creating a backup set. If it is absent, index files will be backed up. BEEP Meaning Whether OS/2 Warp Server Backup/Restore should make a noise when it asks for a removable drive to be inserted. Valid values YES or NO This keyword is optional when creating a backup set. If it is absent, a noise will be made. VERIFY Meaning Whether OS/2 Warp Server Backup/Restore should confirm that the data written to the removable drive is correct. Valid values YES or NO This keyword is optional when creating a backup set. If it is absent, backups will not be verified. For example: PsnsSetBackupSetConfig handle, bksName, "BEEP=NO;VERIFY=YES" Removable drive backup sets can be reconfigured. ═══ 19.7. Virtual storage device ═══ There are no configuration strings for the virtual storage device or backup sets.