Operating System - HP-UX
1833682 Members
4683 Online
110062 Solutions
New Discussion

Transfer Print Queue Entries

 
Glenn Mitchell_2
Frequent Advisor

Transfer Print Queue Entries

I will, within the next month, need to setup print queues in a new UNIX server - duplicates of the queue entries from my old server.
Old Server: N4000 HP/UX 11.11
New Server: rp4440 HP/UX 11i
Unfortunately some of the oldest entries were made using JetAdmin and the TCP/IP address - with the name changed from the address to a proper name during the process. Now I need to find the address the queue was created with. The printers were not added into DNS or QIP. I cannot do a ping or nslookup on the name to obtain the address.
Question-1: Is there a file that keeps the original configuration as print queues are created - that would have the TCP/IP addresses the queue was created with?
Question-2: What files need to be transferred to duplicate the full print queue from the old server to the new one?
Question-3: What files need to be transferred to duplicate a single print queue from the old server to the new one?

Thank you.
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: Transfer Print Queue Entries

Printers added with JetAdmin are "Network" printers in HP-UX speak. Look in the file /var/spool/lp/interface/printer_name andf there will be a line "PERIPH=xx.xx.xx.xx" where xx.xx.xx.xx is either an IP address or a hostname.
If it ain't broke, I can fix that.
Calandrello
Trusted Contributor

Re: Transfer Print Queue Entries

voce uses the Sam with it podera to see all configuracoes of printers including its IPS
Glenn Mitchell_2
Frequent Advisor

Re: Transfer Print Queue Entries

Thank you. I can now find the names and/addresses. Any help with Q2 and Q3?
Question-2: What files need to be transferred to duplicate the full print queue from the old server to the new one?
Question-3: What files need to be transferred to duplicate a single print queue from the old server to the new one?
A. Clay Stephenson
Acclaimed Contributor

Re: Transfer Print Queue Entries

Follow these steps to transfer the entire printer subsystem:

1) Install JetDirect (NOT JetAdmin) software on the new box.

2) Make DNS, NIS, and/or hosts file entries on the new box so that printer hostnames can be resolved.

3) On the old box, do an lpstat and look for any old or hung printjobs and cancel them.

4) lpshut
cd /
find ./var/spool/lp ./etc/lp -print | cpio -ocv > /var/tmp/lp.cpio

5) Transfer using rcp, ftp, ... /var/tmp/lp.cpio from the old box to the new.

6) On the new box:
lpshut
cd /
find ./var/spool/lp ./etc/lp -print | cpio -ocv > /var/tmp/lp.cpio.safe (just in case)
cpio -icvdum < /var/tmp/lp.cpio

7) Now edit your /var/spool/lp/interface/myprinter files to fix any bogus "PERIPH=xx.xx.xx.xx" entries possibly changing IP addresses to hostnames while you are at it.

8) "/opt/hpnpl/bin/transferqueue local"
and answer "all" when prompted. This will convert any existing JetAdmin interface files to use JetDirect.

9) lpsched

All should be well.

It's not possible to transfer a single printer merely by copying files. Yopu have to run addqueue or lpadmin commands to accomplish this task.


If it ain't broke, I can fix that.
Glenn Mitchell_2
Frequent Advisor

Re: Transfer Print Queue Entries

Thank you for your help. I'll follow the instructions to copy over the entire queue(s).
SAM does not show the TCP/IP addresses the individual queues were setup with.