Operating System - HP-UX
1830044 Members
5421 Online
109998 Solutions
New Discussion

copy network printer definition

 
SOLVED
Go to solution
Franky Leeuwerck_2
Super Advisor

copy network printer definition

Hi folks ,

I need to copy a printer definition from host A to B.
A and B belong to the same WAN but are not on the same LAN.
From B I am able to ping the ip-address.
Host A is an HP-UX 11 PA-RISC.
Host B is an HP-UX 11i ia64 Itanium.

The printer is an SATO M80400 printer.
At least that was what the local IT responsable told me. It is connect through JetDirect.

How can I copy the definition ?

Regards,
Franky
5 REPLIES 5
Rick Garland
Honored Contributor
Solution

Re: copy network printer definition

This entails copying the respective files for /etc/lp/interface, /etc/lp/interface/model.orig, /var/spool/lp, etc.

If this is for just 1 printer, it is easier to add the printer to the other system.

Franky Leeuwerck_2
Super Advisor

Re: copy network printer definition

Hi Rick,

You are right. Unfortunately, when adding the printer in SAM ( network printer ), I get prompted for an HP model and I have not the clue what I should choose. It is not an HP printer but a 'thermo printer' for printing barcodes on sticky labels.

Franky
Rick Garland
Honored Contributor

Re: copy network printer definition

A question I have is how this printer was added to systemA to begin with. Was there a vendor supplied driver? Was it added as a dumb plot or dumb printer?

Check what the driver is on sysA. I believe this is /etc/lp/interface/model.orig

Add the printer via JetDirect as normal. Choose the 'dumb' printer/plotter for the model. Copy 2 files from sysA to sysB. /etc/lp/interface/ and /etc/lp/interface/model.orig/

Franky Leeuwerck_2
Super Advisor

Re: copy network printer definition

Thanks Rick.

I followed your last suggestions.
I am remote and the site is closed, so I can only test in the morning.

Regards,
Franky
Darren Etheridge_2
Super Advisor

Re: copy network printer definition

Here are a list of procedures I use to copy printer definitions. Good luck.



Install JetDirect software on the new box. I'll assume that you have hostname resultion (DNS,NIS(+),LDAP, and/or /etc/hosts) already setup.

On the old box, do an lpstat -t and cancel any hung/old print jobs. There's no point in moving them. Next do an lpshut.
As root (on the old box):
cd /
find ./var/spool/lp ./etc/lp -print | cpio -ocv > /var/tmp/lp.cpio

Now ftp/rcp /var/tmp/lp.cpio from the old box to the new box.

On the new box:
lpshut
Now we'll save the current configuration (just in case).
cd /
find ./var/spool/lp ./etc/lp -print | cpio -ocv > /var/tmp/newlp.cpio
cd /var/spool
rm -r lp
cd /etc
rm -r lp
cd /
cpio -icvdum < /var/tmp/lp.cpio

Now, if your old box was running JetAdmin instead of JetDirect, we need to update your interface files. This is done by running /opt/hpnpl/bin/transferqueue local;
respond with all.

Finally, lpsched and everything including the default printer is setup.