1834465 Members
3033 Online
110067 Solutions
New Discussion

Moving printers

 
SOLVED
Go to solution
Steve Start
Advisor

Moving printers

Hello HP experts,

I am migrating printers from my K-380 under 11iv1 to my rp-3410 running 11iv2. I copied everything under /etc/lp and /var/spool/lp but now nothing works. How do I fix this?

Thanks,
Steve
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Moving printers

Shalom,

Printer management:
http://docs.hp.com/en/438861-003/438861-003.pdf

This might be a job for sam.

If the printer worked under 11.11 it should work under 11.23.

I think running through configuration is the way to go here.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Moving printers

First, while your procedure, in principle, works, lp is extremely sensitive to file/directory ownership, group, and mode so if you simply used rcp or ftp, much of that was lost. You should create a tarball or cpio file to copy from one to the other. Your procedure would then work for like version to like version (11.11 to 11.11; 11.23 to 11.23, and sometimes for unlike to unlike 11.0 to 11.11). However, the lp subsystem is a bit different (and imcompatible) between 11.11 and 11.23 so here is how I would approach it:

1) Get your hostname resolution working on the new box (/etc/hosts, NIS, NIS+, DNS, LDAP) as it does on the old so that printer hostnames can be resolved.

2) Install the JetDirect software on the new box.

3) On the old box:
/usr/sam/lpbin/lpmgr -S -xsavedir=/var/sam/lp
cd /var/sam
chown -R lp:lp lp # this prevent problems later
find lp -print | cpio -ocv > /var/tmp/samlp.cpio

4) Copy /var/tmp/samlp.cpio from the old box to the new using rcp, sftp, ftp, ...

5) On the new box:
cd /
lpshut
find ./etc/lp ./var/spool/lp -print | cpio -ocv > /var/tmp/lp.cpio #just in case

6) cd /var/sp
cpio -icvdum < /var/tmp/samlp.cpio
/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/p

7) lpsched
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: Moving printers

Almost same as Clay's:

/usr/sam/lbin/lpmgr -S -v -xsavedir=/var/sam/lp/ ; cp -r -p /var/sam/lp/lp.new/* /var/sam/lp/

tar -cvf lp.tar /var/sam/lp

scp that to remote server

on remote, lpshut

tar xvf lp.tar

/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp/

lpsched -v


Note: this will work for Jet Direct printers - remote's are hit and miss and usually need to be re-created.

Make sure you have HPPI on your rp3410.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: Moving printers

Oops, I'm stupid. I noticed a few typing booboo's in my earlier post but spelling count in UNIX; here's the (hopefully) flawless procedure:


1) Get your hostname resolution working on the new box (/etc/hosts, NIS, NIS+, DNS, LDAP) as it does on the old so that printer hostnames can be resolved.

2) Install the JetDirect software on the new box.

3) On the old box:
lpshut
/usr/sam/lpbin/lpmgr -S -xsavedir=/var/sam/lp
cd /var/sam
chown -R lp:lp lp # this prevents problems later when we restore
find lp -print | cpio -ocv > /var/tmp/samlp.cpio
lpsched

4) Copy /var/tmp/samlp.cpio from the old box to the new using rcp, sftp, ftp, ...

5) On the new box:
cd /
lpshut
find ./etc/lp ./var/spool/lp -print | cpio -ocv > /var/tmp/lp.cpio # just in case

6) cd /var/sam
cpio -icvdum < /var/tmp/samlp.cpio
/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp

7) lpsched
If it ain't broke, I can fix that.
Steve Start
Advisor

Re: Moving printers

Hi guys. Thanks for the pointers.

The first time I did this following A. Clay's steps it didn't work. All of the model scripts in /vap/spool/lp/interface were missing. I checked all of my steps and I missed these.

cd /var/sam
chown -R lp:lp lp

I ran all the steps again and this time it worked! All of my jetdirect and remote printers are working.

Thank you,
Steve



A. Clay Stephenson
Acclaimed Contributor

Re: Moving printers

Yep, that's what happens. I haven't gone through all of the lpmgr script and especially the utilities that lpmgr in turn invokes. I suspect that when the interface files are being copied that the effective user is lp and the files are owned by root. If you are running a tight umask on the source machine, e.g. 027 (as you always should be) then the files can't be read. The chown -R lp:lp lp corrects that.
If it ain't broke, I can fix that.