Cross-Architecture print server migrations: Speeding up the migration process

Cross-Architecture print server migrations: Speeding up the migration process

  • Comments 3
  • Likes

Hello everyone, it’s been a long time! Today we’ll discuss about cross-architecture print server migrations.

With the current and future line of windows servers moving exclusively to x64 architecture, cross-architecture print server migrations is inevitable. Migrating print servers within servers of the same architecture is straightforward using printbrm; it is as simple as backup and restore, no additional work is required. However, migrating from an existing x86 print server to an x64 server is a whole different game. It is easy if you already have the print drivers installed for both x86 and x64 clients, however that is mostly not the case.

The currently supported method of cross-architecture migration requires that you install the print drivers on the source server before taking the backup (recommended) or pre-install them on the target server prior to restoration of the backup. If there is only a relatively small number of printers, it is recommended that you install fresh so that all the old drivers are not carried over to the new server. See a complete list of recommendations here. However, this may be more easily said than done. Based on the number of print drivers, the migration can be time consuming and difficult as you need to download the correct drivers from the OEM website and install them manually.

Several customers have asked us if there is a way to automate this process. Unfortunately it is not technically feasible to automate the process. There is no way we can keep track of all the OEM printer drivers and its URLs, there are hundreds of printer models with every OEMs and you can imagine how difficult that can be. Today we’ll see how we can we can speed up the migration process and take out a bit of the pain.

By default, if you attempt to restore a printbrm backup of x86 server on to an x64 server, the print queues does not get restored on the target if there is no corresponding x64 driver available; only the 32bit drivers, Ports, Print Processors and Print monitors gets restored on the target node.

1. Speeding up migration using "Generic / Text Only" driver

As noted above, the print queues do not migrate until you install the x64 drivers, so how can you bring up the new server quickly with all the print queues? One simple workaround is to set all the existing print queues to the "Generic / Text Only" driver for migration and later switch them to the OEM driver at your convenience. Most printers allow basic printing using the Generic Text driver.

To do this, restore the backup to an intermediate x86 server and run the following command locally to set all the printers to "Generic / Text Only" driver.

Setprinter.exe "" 2 pDriverName="Generic / Text Only" Note: Setprinter.exe is part of the Windows 2003 Resource Kit tools

Remove all drivers from the interim server that are not in use. This is easily accomplished by opening the Print Management Console, expanding Print Servers \ Server Name \ Drivers, highlighting all drivers in the right-hand pane and hitting the delete key. (Note: The Generic / Text Only driver will indicate that it is in use.)

Now, backup and restore this interim server to your x64 Server using printbrm and you should see all your print queues appear on the target server.

Printbrm.exe –B –S \\oldserver –F c:\temp\GenericBackup.printerExport –NOBIN

At this point you may switch the queues on the destination server back to their original driver.

2. Substituting drivers the easy way using a configuration file for BRM

Sometime back we blogged about using a configuration file for PrintBRM here. While the configuration file itself is of great help, it is very difficult to create it manually. So, here is a sample VBScript to automatically generate the configuration file for you. Copy into Notepad and rename to CreateBRMConfigXML.vbs.  Note: This VB Script is not currently designed to work against a cluster.

strComputer = "." 


quote= chr(34)

XMLtag="<?xml version=" + quote + "1.0" + quote + " encoding=" + quote + "UTF-8" + quote + " standalone=" + quote + "yes" + quote + "?>"

drvold="<DRV old=" +quote

newdrv=quote + " new=" +quote +"Generic / Text Only" + quote + "/>"



Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_PrinterDriver",,48)

Wscript.Echo XMLtag
Wscript.Echo "<BrmConfig>"
Wscript.Echo "<DriverMap>"

For Each objItem in colItems

'Wscript.Echo "<DRV old=" &quote & ExtractDriverName(objitem.Name) &quote & " new=" &quote & "Generic / Text Only" &quote & "/>"
Wscript.Echo drvold & ExtractDriverName(objitem.Name) &newdrv

Next


Wscript.Echo "</DriverMap>"
Wscript.Echo "</BrmConfig>"


Wscript.Quit


Function ExtractDriverName(dName)
ExtractDriverName = Left(dName,(InStr(dName,",")-1))
End Function

 

On the old print server run the following command to generate the Config File:

Cscript //Nologo CreateBRMConffigxml.vbs > DriverMapping.XML

 

This should create a file like the one below mapping every driver to the "Generic / Text Only" driver when used with the –C option in printbrm.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<BrmConfig>

<DriverMap>

<DRV old="Xerox WorkCentre Pro C3545 PS" new="Generic / Text Only"/>

<DRV old="Xerox WorkCentre Pro C2128 PS" new="Generic / Text Only"/>

<DRV old="HP LaserJet 8000 Series PCL 6" new="Generic / Text Only"/>

</DriverMap>

</BrmConfig>

 

Setting every printer to "Generic / Text Only" may not always serve our purposes, so we have some more tricks to allow for more customization. Here we will make use of the Universal drivers made available by various OEMs for a better printing experience.

Right click the DriverMapping.XML file and open with Microsoft Excel, preferably version 2010 as that is the one we tested on. Choose open "As an XML table" when prompted:

image

This should open up the driver mappings in an easily editable table:

image

Now you can Map the OEM drivers to its corresponding Universal driver by simply replacing the driver name in the “new” column with the exact driver name of the universal driver and use fill/copy for the rest of the drivers just as you would work with an excel file.

image

Note that the driver names you put in here should match EXACTLY with the installed driver; also make sure you install both x86 and x64 versions of these drivers on the target server before attempting the restore.

For example, some of the OEM universal drivers are named as follows: "Xerox Global Print Driver PCL6", "HP Universal Printing PCL 6", "Lexmark Universal" etc. There are various versions of UPD hence make a note of the one you have installed on the target server.

Once the substitution is done, right-click anywhere on the table and choose XML -> Export and save it as DriverMapping.XML This will create the new Configuration file with the newly added mappings to the Universal drivers or other compatible drivers of your choice.

Note:  Before running the restore, edit the XML configuration file in notepad and insert the following 2 lines as below between the <BrmConfig> and <DriverMap> sections. Missing this step will cause the export to fail with “unspecified error” (0x80004005).

<BrmConfig>
<PLUGINS />
<LanguageMonitors />
<DriverMap>

You can use the following command to specify the Configuration file when restoring:

Printbrm.exe –R –S \\NewServer -F c:\temp\Backup.printerExport –C c:\temp\ DriverMapping.XML –O FORCE

If you do not want to migrate your old drivers to the new server use the backup generated using the –NOBIN option:

Printbrm.exe –R –S \\NewServer -F c:\temp\nobinBackup.printerExport –C c:\temp\ DriverMapping.XML –O FORCE

This should restore the Printers to your new 64-bit server and map them to the Generic/Universal drivers without having to install hundreds of device specific OEM drivers.

Standard disclaimer: please note that we are in no way recommending the Universal drivers of any specific OEM and you will need to test them to make sure that it supports your printers and meets your business requirements.

REFERENCES:

Two Minute Drill: PRINTBRM and the Configuration File http://blogs.technet.com/b/askperf/archive/2009/02/20/two-minute-drill-printbrm-and-the-configuration-file.aspx

Best practices on deploying a Microsoft Windows Server 2008/Windows Server 2008 R2 Print Server http://blogs.technet.com/b/yongrhee/archive/2009/09/14/best-practices-on-deploying-a-microsoft-windows-server-2008-windows-server-2008-r2-print-server.aspx

Print Services Migration: Preparing to Migrate

http://technet.microsoft.com/en-us/library/dd379527(WS.10).aspx

Sumesh P.

Share this post :


Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • :( where was this last year... i am throwing a rope over a low branch now and jumping.

  • Falling at the first hurdle with this one. On the 2008R2 server when I run

    c:\windows\system32\spool\tools\printbrm.exe –B –S \\<oldserver> -f C:\Printers\Temp\Printerbackup.printerexport -nobin

    I get

    Error: Unknown argument: -B

    :(

    Have applied KB2636591 to allow for multi-threading and the helpful message after the error goes on to tell me that I should use the -B argument to backup a print server ><

    Anyone else hit this issue?

  • Hi Nelson,

    Please try to type the entire command instead of copying and pasting it and then see if that makes any difference.

    You can also try the tool mentioned here blogs.technet.com/.../migrating-print-queues-quickly-using-printbrm-configuration-files-and-the-generic-text-only-driver.aspx

    Thanks

    Digvijay