═══ 1. Introduction ═══ The OS/2 Warp Server Backup/Restore Command Line gives you access to OS/2 Warp Server Backup/Restore operations from the OS/2 command line. It not only enables you to run backups and restores but also to perform most of the operations available from the graphical user interface version of the product. This reference assumes that the reader is familiar with basic OS/2 Warp Server Backup/Restore concepts such as backup methods, backup sets and file filters. This pre-requisite knowledge can be found in the main OS/2 Warp Server Backup/Restore user guide and in the on-line help. If you have never used the graphical user interface version of the product you may find it helpful to experiment with that first before using the OS/2 Warp Server Backup/Restore Command Line The OS/2 Warp Server Backup/Restore Command Line was implemented using the OS/2 Warp Server Backup/Restore C language API. Therefore if you have programming knowledge you may find reading through the C API reference will also help your understanding of the command line interface. Note: If you have a version of OS/2 Warp Server Backup/Restore other than the English version then commands can be issued in your native language as well as in English. To find out what the versions of the command are in your native language use the Help command. ═══ 2. Using the OS/2 Warp Server Backup/Restore Command Line ═══ To run the OS/2 Warp Server Backup/Restore command line interface you must first run the API server. See the Backup/Restore C API Guide and Reference for details on running the API server. By default the OS/2 Warp Server Backup/Restore Command Line looks for the server on the default pipe name. If you want to communicate with the server on a different pipe, or over TCP/IP you can do so by setting the following environment variables or system settings. Environment Var. System Setting Description PSNS_CONNECTION Connection Type of connection, PIPE (default) or TCPIP PSNS_SERVER Server Name of the server PSNS_PIPE Pipe Name of the pipe to use PSNS_TCPIP Tcpip TCPIP configuration, : PSNS_QUIET Quiet Prevents user involvment during command. Must be YES or NO (or TRUE or FALSE or 1 or 0 ) OS/2 Warp Server Backup/Restore Command Line commands are not case sensitive, that is you can use any mix of upper and lower case letters. However the names of OS/2 Warp Server Backup/Restore objects like backup methods and file filters are case sensitive so make sure to use the right case when specifying them. If the names have spaces in them these must be included too. To run OS/2 Warp Server Backup/Restore Command Line commands simply open an OS/2 session, change directory to where you installed OS/2 Warp Server Backup/Restore then enter the command at the command prompt. If you enter a command incorrectly the program will respond with an error message and help on the relevant command. ═══ 3. OS/2 Warp Server Backup/Restore Commands ═══ This chapter describes the commands which can be issued via the OS/2 Warp Server Backup/Restore Command Line. For information on how to use the command line see Using the OS/2 Warp Server Backup/Restore Command Line. The following is a list of the commands which are recognised: BackupMethod To view, create, copy, delete, run or alter a backup method. BackupSet To view, create, delete, transfer or alter a backup set. Event To view, create, copy, delete or change a scheduled event. FileFilter To view, create, copy, delete or alter a file filter. Help To obtain on-line help for the program. List To list items which fit certain criteria, such as backup sets, backup or restore methods, file filters, or storage devices. RestoreMethod To view, create, copy, delete, run or alter a restore method. Rulebook To view, create, copy, delete or alter a rulebook. Settings To change or view the settings. SourceDrive To change, refresh or view the source drive settings. StorageDevice To change, create, delete or view the storage device settings. TestServer To test that a connection to a server is properly established. Volume To associate, change, create, delete or view the volume settings. ═══ 3.1. BackupMethod ═══ Description The BackupMethod command can be used to create backup methods. Having created a backup method it can then be run in order to perform a backup. The command can also be used to change, copy, rename and delete backup methods. Syntax ──BackupMethod─┬─Change─────┬──────┬───────────────────────┬── ├─Copy───────┤ │ ┌───────────────────┐ │ ├─Create─────┤ │  │ │ ├─Delete─────┤ └─┴─=─┴─┘ ├─Rename─────┤ ├─Run────────┤ └─View───────┘ See one of the following for more details: Change Modifies an existing backup method. Copy Copies an existing backup method. Create Creates a new backup method. Delete Deletes an existing backup method. Rename Renames an existing backup method. Run Runs an existing backup method. View Views all the settings for an existing backup method. ═══ 3.1.1. Change ═══ Description Changes the settings of an existing backup method. Note: To change the name of a backup method use the Rename command. Syntax ─BackupMethod Change ──────┬───────────────────────────┬─··· └─Description=─┘ ···┬──────────────────────────┬─··· └─AllFiles=─┬─TRUE|YES|1─┬─┘ └─FALSE|NO|0─┘ ···┬────────────────────┬─┬────────────────────┬─┬───────────────────────────┬─··· └Drive=┘ └Directory=┘ └Subdirectories=┬TRUE|YES|1┬┘ └FALSE|NO|0┘ ···┬─────────────────────────┬─┬────────────────────┬─··· └UseRulebook=┬TRUE|YES|1┬─┘ └Rulebook=─┘ └FALSE|NO|0┘ ···┬────────────────────────┬─┬──────────────────────┬─··· └Compression=─┬─ON──────┬┘ └─Generations=─┘ ├─OFF─────┤ └─DEFAULT─┘ ···┬───────────────────────────┬─┬────────────────────────┬─··· └UseFileFilter=┬TRUE|YES|1┬─┘ └FileFilter=─┘ └FALSE|NO|0┘ ···┬────────────────────────────┬─┬────────────────────┬─┬──────────────────────┬── └ChangedFilesOnly=┬TRUE|YES|1┤ └Preview=┬TRUE|YES|1┬┘ └BackupSet=┘ └FALSE|NO|0┘ └FALSE|NO|0┘ Note: If the AllFiles setting is set to a TRUE value then the Subdirectories, Drive and Directory settings are all ignored when a backup method is run. Similarly if the UseRulebook setting is set to a TRUE value then the Compression and Generations settings are ignored when the backup method is run. Examples To turn on compression for the backup method called 'ServerBackup'. psnscl backupmethod change ServerBackup Compression=ON To change the description of the 'ServerBackup' backup method. psnscl backupmethod change ServerBackup Description="A full backup" ═══ 3.1.2. Copy ═══ Description Copies an existing backup method to a specified new name. Syntax ─BackupMethod Copy NewName=─ Examples To make a copy of backup method 'ServerBackup' and give it the name 'FullBackup'. psnscl backupmethod copy ServerBackup NewName=FullBackup ═══ 3.1.3. Create ═══ Description Creates a new backup method. Syntax ─BackupMethod Create ────────BackupSet=─··· ···─┬───────────────────────────┬───┬──────────────────────────┬─··· └─Description=─┘ └─AllFiles=─┬─TRUE|YES|1─┬─┘ └─FALSE|NO|0─┘ ···┬────────────────────┬─┬────────────────────┬─┬───────────────────────────┬─··· └Drive=┘ └Directory=┘ └Subdirectories=┬TRUE|YES|1┬┘ └FALSE|NO|0┘ ···┬─────────────────────────┬─┬────────────────────┬─··· └UseRulebook=┬TRUE|YES|1┬─┘ └Rulebook=─┘ └FALSE|NO|0┘ ···┬────────────────────────┬─┬──────────────────────┬─··· └Compression=─┬─ON──────┬┘ └─Generations=─┘ ├─OFF─────┤ └─DEFAULT─┘ ···┬───────────────────────────┬─┬────────────────────────┬─··· └UseFileFilter=┬TRUE|YES|1┬─┘ └FileFilter=─┘ └FALSE|NO|0┘ ···┬────────────────────────────┬─┬─────────────────────┬── └ChangedFilesOnly=┬TRUE|YES|1┤ └Preview=┬TRUE|YES|1┬─┘ └FALSE|NO|0┘ └FALSE|NO|0┘ Note: If the AllFiles setting is set to a TRUE value then the Subdirectories, Drive and Directory parameter settings are all ignored when a backup method is run. Similarly if the UseRulebook parameter setting is set to a TRUE value then the Compression and Generations parameter settings are ignored when the backup method is run. Defaults Settings which are not explicitly specified when the backup method is created will be set to their default values. To alter the settings after the backup method has been created you may use the Change command. Examples To create a new backup method called 'All D' which backs up all files on the D drive to the 'Tape' backup set. psnscl backupmethod create "All D" BackupSet="Tape" AllFiles=FALSE Drive=D Directory="\" SubDirectories=TRUE To create a new backup method called 'Default' which backs up all files to the default backup set. The backup method will take the default settings for the unspecified parameters. psnscl backupmethod create Default BackupSet="" ═══ 3.1.4. Delete ═══ Description Deletes a specified backup method. Syntax ─BackupMethod Delete ─ Examples To delete a backup method called 'Default'. psnscl backupmethod delete Default ═══ 3.1.5. Rename ═══ Description Renames an existing backup method to a specified new name. Syntax ─BackupMethod Rename NewName=─ Examples To rename the 'All D' backup method and call it 'All D to tape'. psnscl backupmethod rename "All D" NewName="All D to tape" ═══ 3.1.6. Run ═══ Description Runs the specified backup method. A progress panel is displayed while the backup runs. Syntax ─BackupMethod Run ─ Examples To run the backup method 'ServerBackup'. psnscl backupmethod run ServerBackup ═══ 3.1.7. View ═══ Description Views all the settings for a specified backup method. Syntax ─BackupMethod View ─ Examples To view the backup method 'ServerBackup'. psnscl backupmethod view ServerBackup ═══ 3.2. BackupSet ═══ Description The BackupSet command is used to change, create, delete, empty, transfer or view a backup set. Syntax ──BackupSet─┬─Change─────┬───────┬───────────────────────┬─ ├─Create─────┤ │ ┌───────────────────┐ │ ├─Delete─────┤ │  │ │ ├─Empty──────┤ └─┴─=─┴─┘ ├─TransferIn─┤ ├─TransferOut┤ └─View───────┘ For more information see one of the following: Change Changes the settings of a backup set Create Creates a new backup set Delete Deletes a backup set Empty Empties a backup set TransferIn Transfers In a backup set. TransferOut Transfers Out a backup set. View Views all the settings of a backup set ═══ 3.2.1. Change ═══ Description Changes the settings of an existing backup set. For single device backup sets the IncConfig setting should be omitted. Syntax ──BackupSet Change───┬───────────────────────────┬─··· └─Description=─┘ ···─┬───────────────────────────────┬─┬───────────────────────┬─ └─Configuration=─┘ └─IncConfig=─┘ Examples To change the description for the single device backup set 'DRTape' to 'Disaster Recovery Tape'. psnscl backupset change DRTape Description="Disaster Recovery Tape" ═══ 3.2.2. Create ═══ Description Creates a new backup set. Note that once a backup set has been created it's storage device cannot be changed. To create a dual device backup set specify the IncDevice and IncConfig settings. To create a single device backup set omit these settings. Syntax ──BackupSet Create ─┬───────────────────────────┬─··· └─Description=─┘ ···─Device=─┬───────────────────────────────┬─··· └─Configuration=─┘ ···──┬───────────────────────┬─┬───────────────────────┬─ └─IncDevice=─┘ └─IncConfig=─┘ Examples To create a single device backup set 'User Backups' that backs up to the 'Diskette A (3.5")' storage device. The backup set is left to take the default configuration string. psnscl backupset create "User Backups" Device='Diskette A (3.5")' To create a dual device backup set 'Server Backups' that does an initial base backup to the 'Drive G' storage device, then subsequent incremental backups to the 'Tape' storage device. The configuration string for the base device is set so that backups will be performed to the 'BKPDIR' directory. psnscl backupset create "Server Backups" Device="Drive G" Configuration="PATH=BKPDIR" IncDevice="Tape" ═══ 3.2.3. Delete ═══ Description Deletes an existing backup set. Syntax ──BackupSet Delete ─ Examples To delete the backup set called 'Test'. psnscl backupset delete Test ═══ 3.2.4. Empty ═══ Description Empties an existing backup set. Syntax ──BackupSet Empty ─ Examples To empty the backup set called 'Weekly'. psnscl backupset empty Weekly ═══ 3.2.5. TransferIn ═══ Description Transfers in a backup set which has previously been transferred out. If the Device setting is included OS/2 Warp Server Backup/Restore will scan that storage device for a backup set of the given name and transfer it in. Otherwise the command will look for the backup set in the 'Unavailable Sets' part of the backup sets container of the OS/2 Warp Server Backup/Restore Graphical User Interface (GUI). Syntax ──BackupSet TransferIn ─┬─────────────────┬─ └─Device=─┘ Examples To transfer in the 'Data Files' backup set from the 'Diskette A (3.5")' device. psnscl backupset transferIn "Data Files" Device='Diskette A (3.5")' To transfer in the 'Recovery' backup set from the unavailable sets. psnscl backupset transferIn "Recovery" ═══ 3.2.6. TransferOut ═══ Description Transfers out an existing backup set. Syntax ──BackupSet TransferOut Forget=─┬─TRUE|YES|1─┬─ └─FALSE|NO|0─┘ Examples Transfer out and forget the 'Data Files' backup set. psnscl backupset transferOut 'Data Files' forget=YES ═══ 3.2.7. View ═══ Description Views all the settings associated with a backup set. Syntax ──BackupSet View ─ Examples To view the settings of the 'Drive D (General)' backup set. psnscl backupset view "Drive D (General)" ═══ 3.3. Event ═══ Description The Event command is used to create OS/2 Warp Server Backup/Restore scheduled events. Once created, events can be updated and changed to inactive if they are not required. They can be re-activated when required again. Syntax ──Event─┬─Change───┬───┬───────────────────────┬─  ├─Copy─────┤ │ ┌───────────────────┐ │ ├─Create───┤ │  │ │ ├─Delete───┤ └─┴─=─┴─┘ └─View─────┘ For more information see one of the following: Change Changes an existing scheduled event. Copy Copies an existing scheduled event. Create Creates a new scheduled event. Delete Deletes a scheduled event. View Views all the settings of a scheduled event. ═══ 3.3.1. Change ═══ Description Changes the settings of an existing scheduled event. Note: Once an event has been created its type (for example, Daily, Monthly) cannot be altered. Syntax ──Event Change ─┬────────────────────────────┬··· │ ┌────────────────────────┐ │ │  │ │ └─┴─