6.11.7 Starting the Replacement Server on the Network

6.12 Step 4: Migrating the Print Server

Print servers often cause the most problems for system administrators. OS/2 INI files can be easily damaged if servers crash. Of course, most of the key information about printers is held in the OS/2 INI files. These INI files can become corrupted when new software is installed. Migration of a print server is, therefore, a potentially complex prospect.

However, there are many tools and utilities available to assist in the migration process. They help to smooth the migration and make it as painless as possible. With the tools, the time consuming, annoying task of having to reinstall the printer configuration from scratch is no longer a concern.

In this section, the discussion is limited to the migration of printer configuration from one server to another. Previous sections of this chapter have already discussed introducing a new system to the network and how data might be migrated.

By way of an overview, the steps required in migrating a print server can be described as follows:

  1. Back Up Existing Printer Configuration

  2. Install Printer Drivers onto New Server

  3. Restore Printer Configuration onto New Server

Note

This process assumes that the new server has already been installed, and that migration of the printer configuration is all that is needed.




Figure 126: Print Server Migration Overview

We first introduce some of the tools that can be useful in backup and restoration of printer configurations. We then go on to discuss the migration of the print server in example domain D01.

6.12.1 BACKPRN

BACKPRN is a utility that can be used to backup printer and job properties to a file. This file can be used later for restoration by RESTPRN (see Section 6.12.2 RESTPRN) or RINSTPRN (the remote printer installation program - see Section 6.12.3 RINSTPRN).

A printer and job properties file consists of printer driver specific data, defined for a printer and a queue. The printer part describes hardware related information, such as which fonts are installed or which options are installed on the printer. The job properties consist of information about what paper to select, what resolution and orientation to use, and so on. So, printer properties belong to the printer, and job properties belong to a queue. These two types of properties are closely related to each other; so, it makes sense to back them up together.

Invoking BACKPRN without any command line parameter will show the syntax of the program as well as the available printers, queues, and the printer drivers used by them.

The syntax for BACKPRN is
BACKPRN <printer-name>[.<queue-name>] <file-name>

where:

<printer-name>
This is the name of the printer to copy the printer properties from.
<queue-name>
(Optional) This is the name of the queue to copy the job properties from (if no queue is specified, the first defined for the printer is used).
<file-name>
This is the name of the property file.

For example:

BACKPRN PSCRIPT1.PSCRIPT1 pscript.pjp

The property file (extension .pjp) created with the BACKPRN contains the printer and job properties as well as information about the driver used. A real example follows.

Note

The following example does NOT relate to the Domain D01 example.

Executing the command without any parameters will display the output as shown in Figure 18.



Figure 127: BACKPRN Output

To continue the example, the command is executed again to save the properties of the IBM 4019 printer with the output as illustrated in Figure 19.

Although there is a warning in this particular example, the backup completes successfully. The printer properties that cannot be found are printer driver specific settings (such as forms and tray information) that, in this case, have not been changed. We decided to include it in the example because the help on the utility is not extensive, and we wanted to show that the message was nothing to worry about.



Figure 128: Using BACKPRN to Save Printer Properties

6.12.2 RESTPRN

Printer and job properties can be restored using the RESTPRN program. An invocation without specifying any parameter shows the command line syntax as well as a list of available printers, queues, and their printer drivers.

An invocation, specifying a property file and a question mark, shows the printer name, queue name, and the driver to which the properties stored in the file belong. An invocation with only the name of the property file uses the printer name and queue name stored in the file. If the printer and/or queue does not exist, they will be created by the program.

We have included this tool on the CD ROM accompanying this Red Book.

The syntax for RESTPRN is
RESTPRN <file-name> [<printer-name>[.<queue-name>]]

where:

<file-name>
This is the name of the property file.
<printer-name>
(Optional) This is the name of the printer to copy the printer properties to. If the printer doesn't exist, it will be created. If no printer is specified, the name stored in the property file is used.
<queue-name>
(Optional) This is the name of the queue to copy the job properties to. If the queue doesn't exist, it will be created. If no queue is specified, the name stored in the property file is used.

For example:

RESTPRN pscript.pjp PSCRIPT1.PSCRIPT1

Note on RESTPRN

Both OS/2 Installation Techniques: The CID Guide, SG24-4295, and The OS/2 Warp 4 CID Software Distribution Guide, SG24-2010, state that the target machine must be at the same level of OS/2 and NLS support as the backup machine. Clearly, this is not good for a migration scenario.

We used BACKPRN on older versions of OS/2 and restored those properties using RESTPRN onto OS/2 Warp Server for e-business. We did not find any problems. However, as part of your migration testing procedure, you should confirm the results for your specific configurations.

6.12.3 RINSTPRN

The Remote Multiple Printer Installation program (RINSTPRN) for OS/2 was written at the ITSO, Boca Raton, Florida. Its main purpose is to install printers at the time of initial OS/2 installation.

In the context of migrating hardware, this utility can be used as part of the remote CID-based installation prior to implementing the new print server. The utility is not needed in an attended installation. Following installation of the appropriate printer drivers, the system's printer configuration can be restored using RESTPRN.

Note

RINSTPRN was written to run on OS/2 V2.1, OS/2 V2.11, and OS/2 Warp V3. However, it has been widely used in the CID install community for remote printer installation. The utility is supplied by IBM on an as-is basis.

We tested the utility on OS/2 Warp Server for e-business for migration purposes and did not encounter any problems with it. However, we do recommend that you test it prior to implementation. We have included this tool on the CD ROM accompanying this Red Book.

The application makes it possible to install multiple printers and queues using a response file instead of going through many dialogs. It performs the installation of printers, queues, and ports including communication ports. This application also gives the administrator the ability to make final adjustments including print driver-specific information, such as job and printer properties, fonts, options, and so on during the automated process. Finally, it also allows the definition of network queues and the definition of WIN-OS/2 printers.

The program reads a response file, interprets it, and looks for consistency between the defined queues, printers, and other values. After finishing this step, it installs the printers, drivers, and queues. All actions are logged into a log file for administrative purposes.

This program makes it possible to administer complex printer and queue configurations without the administrator being at the installation location.

Note on Print Driver Levels

Printer drivers that are already installed will automatically be replaced by the program. If your printers are using a driver other than that shipped with OS/2 Warp Server for e-business, then adequate procedures are needed to make sure that the end configuration is as it should be. This, again, supports the requirement to do sufficient testing.

The Remote Printer Installation Program is discussed in detail in the ITSO redbooks OS/2 Installation Techniques: The CID Guide, SG24-4295, and The OS/2 Warp 4 CID Software Distribution Guide, SG24-2010. There is an associated utility, RMPI_CFG.EXE, a response file generator, which is not discussed here.

Since this chapter deals only with migration of existing printer configurations, we discuss what is required to achieve this. If you want further detail on any of these utilities, please refer to the redbooks referenced above.

RINSTPRN has a number of optional keywords that can be used on the command line.

The syntax for RINSTPRN is
RINSTPRN /DSC /DRV /L1 /R /S /T /WPR /WDR /WT

where the following keywords are described:

DSC
This keyword defines the name of the printer description list. A partially or fully qualified OS/2 path name, including a drive letter, can be used.The PRDESC.LST file changes with every release. A proper printer install can only take place if the PRDESC.LST matches the driver install diskettes. The default is PRDRV.LST in the working directory.
For example:
RINSTPRN /DSC:X:\IMG\OS2\PMDD_1\PRDESC.LST
DRV
This keyword defines the name of the printer driver list. A partially or fully qualified OS/2 path name, including a drive letter, can be used. The PRDRV.LST changes with every release. A proper printer install can only take place if the PRDRV.LST matches the driver install diskettes. The default is PRDRV.LST in the working directory.
For example:
RINSTPRN /DRV:X:\IMG\OS2\PMDD_1\PRDRV.LST
L1
This keyword defines the location of the log file into which the RINSTPRN program logs its response file analysis, activities, and execution results. A partially or fully qualified OS/2 path name, including a drive letter, can be used. The default is RINSTPRN.LOG in the working directory.
For example:
RINSTPRN /L1:C:\RINSTPRN.LOG
R
This keyword defines the location of the printer install response file. A partially or fully qualified valid OS/2 path name, including a drive letter, can be used. The default is PRINTER.RSP in the working directory.
For example:
RINSTPRN /R:X:\RSP\OS2\PRINTER.RSP
S
This keyword defines the source drive and directory where the drivers and fonts to be installed are located. A fully qualified path name with a drive letter can be used. If the drive is A or B, the program asks for the printer driver diskettes on A: or B:. On any other drive (C to Z), the program looks for subdirectories called PMDD_1 to PMDD_n (depending on how many disks are mentioned in column two of the PRDRV.LST) in the specified directory. This drive can also be a redirected drive. The default is A:.
For example:
RINSTPRN /S:A:
T
This keyword defines the target drive where the OS/2 system is installed. Either just the drive letter or the drive letter with a colon can be specified. Use this keyword if OS/2 has been installed to a logical partition rather than a primary partition. The default is C.
For example:
RINSTPRN /T:D
WPR
This keyword defines the name of the WIN-OS/2 printer setup file. A partially or fully qualified OS/2 path name, including a drive letter, can be used. Important: This keyword is OS/2 version dependent. The default value for this parameter is CONTROL.INF. This file resides in the \OS2\MDOS\WINOS2\SYSTEM subdirectory after an installation of OS/2 and may change with every release. This parameter is only used if an installation of WIN-OS/2 printers is requested in the response file. The default is CONTROL.INF in the working directory.
For example:
RINSTPRN /WPR:X:\EXE\CONTROL.INF
WDR
This keyword defines the name of the map file between OS/2 and WIN-OS/2 device drivers. A partially or fully qualified OS/2 path name, including a drive letter, can be used. Note: If the drive letters A: or B: are used, make sure a diskette containing the specified file is inserted in the drive before starting the program.The default value for this parameter is DRVMAP.INF. This file resides in the \OS2\MDOS\WINOS2\SYSTEM subdirectory after an installation of OS/2 and may change with every release. This parameter is only used if the WIN-OS/2 printer installation to an OS/2 printer is requested in the response file. The default is DRVMAP.INF in the working directory.
For example:
RINSTPRN /WDR:X:\EXE\DRVMAP.INF
WT
This keyword defines the target drive where WIN-OS/2 is installed. Either just the drive letter or the drive letter with a colon can be specified. Use this keyword if WIN-OS/2 has been installed to a logical partition rather than a primary partition. The default is C.
For example:
RINSTPRN /WT:D

The following complete example looks for a printer response file on redirected drive Z: with the name PRINTER.RSP. The PRDRV.LST is located on redirected drive Z: in the root subdirectory \PMDD_1. The PRDESC.LST is located on redirected drive Z: in the root subdirectory \PMDD_1. The WIN-OS/2 printer setup file is located in the Z: directory and has the name CONTROL.INF. The WIN-OS/2 driver map file is located in the Z: directory and has the name DRVMAP.INF. The USERnnnn.LOG file will be written to the redirected drive Z:, thereby, gathering the install information on the server. OS/2 and WIN-OS/2 are installed on drive D:. The following example is valid for installation on OS/2 V2.1 and OS/2 Warp V3 since we specify the CONTROL.INF file for the /WPR keyword.

RINSTPRN /R:Z:\PRINTER.RSP /DRV:Z:\PMDD_1\PRDRV.LST /DSC:Z:\PMDD_1\PRDESC.LST /L1:Z:\USERnnnn.LOG /S:Z: /T:D /WPR:Z:\CONTROL.INF /WDR:Z:\DRVMAP.INF /WT:D

Note

We strongly believe that many customer installations use only IBMNULL on the server, thus, allowing the client workstations to format the print jobs. Therefore, this complex example is rather unrealistic even though it shows what can be done with this tool.

We have included this tool on the CD ROM accompanying this Red Book.

6.12.4 CHGQUE

The CHGQUE utility can be used to hold or release any printer queue from the command line. An invocation without specifying any parameters shows the command line syntax as well as a list of available printers, queues and their printer drivers. An invocation specifying a queue name shows the actual status of the queue (Hold or Release).

The syntax for CHGQUE is
CHGQUE <queue-name> [/H[OLD]] [/R[ELEASE]]

where:

<queue-name>
This is the name of the queue whose status will be displayed or changed.
/H[OLD]
Holds the queue.
/R[ELEASE]
Releases the queue.

For example:

CHGQUE PSCRIPT1 /H

CHGQUE is a very useful utility for holding queues prior to, or during, migration and the execution of REXX procedures. It can then release queues on demand. It helps to prevent the loss of print jobs.

We have included this tool on the CD ROM accompanying this Red Book.

6.12.5 QPRINT

QPRINT is a REXX procedure that can be used to query printer and queue settings and then create a response file from them. The generated response file can be used in conjunction with RPRN2.CMD (see Section 6.12.7 RPRN2.CMD) to recreate printers at a later stage in the migration.

Figure 129 shows the command being used on the local machine SRV162 to generate a response file by piping the output to file.



Figure 129: Using QPRINT.CMD to Generate a Printer Response File

Figure 130 shows the resulting response file itself.

Tip

Printers are often created on the OS/2 Workplace Shell Desktop (Object ID WP_DESKTOP). In this REXX procedure, the printers are created in the folder WP_PRINTERSFOLDER. In our experience, this reduces OS/2 INI file-related printing problems.





Figure 130: Printer Response File Generated by QPRINT.CMD

We have included this tool on the CD ROM accompanying this Red Book.

6.12.6 ITSC Print Manager/2

The ITSC Printer Manager/2 utility manages printers on local and remote network systems. It can display, hold, and release queues and jobs and change printer assignments.

Although it is not used specifically in the migration process itself, it is a useful tool that can be employed to obtain information on the print servers that have to be updated. This tool was first supplied in a queue publication titled OS/2 2.11 Power Techniques, ISBN 1-5652-9286-3. We have included this tool on the CD ROM accompanying this Red Book.


Figure 131: Managing Printers with ITSC Print Manager/2

Of course, let us not forget that some of this function is also provided with OS/2's spooler as illustrated in Figure 132.



Figure 132: OS/2 Spooler - All Jobs View

6.12.7 RPRN2.CMD

RPRN2 is a REXX procedure that can be used to create printer definitions. It requires input from a response file created by QPRINT.CMD. It uses the utilities RINSTPRN and CHGQUE to install new printers and to hold the queues.

The syntax for RPRN2.CMD is
RPRN2 /L:LogFile /R:ResponseFile /S:SourcePath

where:

L
Indicates that a log file will be generated.
LogFile
This is the fully qualified path to the generated log file.
R
Indicates that a response file is needed.
ResponseFile
This is the fully qualified path to the response file.
S
This indicates that a path is needed to OS/2 source images.
SourcePath
This is the fully qualified path to the OS/2 images.

We have included this tool on the CD ROM accompanying this Red Book.

Note

The utility requires RINSTPRN.EXE and CHGQUE.EXE to be in the \OS2 directory of the boot drive.

Figure 133 shows the screen output following the execution of RPRN2. The response file supplied in this example contains only one printer definition for clarity. However, we tested it in multiple printer scenarios, and it has tested successfully.

The utility first queries the OS/2 INI file and checks (according to the response file supplied) whether the appropriate printer drivers are installed or not. If they are not, the installation is performed using RINSTPRN. The queues are then put into hold status by CHGQUE, which prevents any jobs that might get sent to them during the procedure from being printed.

Limitation

RPRN2 will not restore specific printer properties, such as forms and tray settings. If special settings are required, we recommend using RPRN2 followed by the use of the RESTPRN to restore these properties. Since the queues are already on hold, this is a simple procedure to execute.

RPRN2 screen output is shown in Figure 133.



Figure 133: Using RPRN2.CMD to Create a Printer

6.12.8 Considerations for Multiple Printer Ports

Network Printer utilities that provide multiple network printer port support, such as Lexmark MarkVision and IBM 4033 boxes, have specific OS/2 INI file port associations. These must be saved from the old system and restored onto the new system during migration. For example, in the case of the Network Printer Utilities, the file \NETPRINT\IBM4033.DAT must be saved.

Different programs provide different methods of achieving this. Before migrating, fully test for any incompatibilities between the version's printer software and the two base operating system versions: OS/2 Warp Server, Version 4 and OS/2 Warp Server for e-business.

6.12.9 OS/2 INI File Tools

There are many OS/2 INI file utilities on the market that might be useful in extracting printer information for use in a migration. In addition (such as the power of REXX in OS/2), procedures can be written to query, extract, and restore vital information about OS/2 printers just as QPRINT.CMD does.

We consider the utilities listed here to be quite sufficient for most printer migration purposes. Therefore, no further utilities are considered.

6.13 Migrating the Example Print Server in Domain D01