Operating System - HP-UX
1833694 Members
3292 Online
110062 Solutions
New Discussion

How do I copy 2000 printers from one server to another

 
SOLVED
Go to solution
Ed Williams_3
Advisor

How do I copy 2000 printers from one server to another

We have over 2000 printers configured in
an HPUX 10.20 system for an old ugly
application. We need to setup all the same
printers on another similarly configured
system. lpmgr is limited to 1024 printers.
How can I get all these printers setup on
the other system without setting them up
one at a time? PLEASE HELP!
7 REPLIES 7
Rita C Workman
Honored Contributor

Re: How do I copy 2000 printers from one server to another

Save myself some typing...here's a thread that should give you a hand:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=182001

Rgrds,
Rita
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How do I copy 2000 printers from one server to another

First, I don't care if you are running the old JetAdmin software, go ahead and install the latest JetDirect software.

Next, on the new box make sure that your hostnames are setup (DNS,NIS,NIS+, and/or /etc/hosts).

Now on the new box, let's backup your current configuration just so we won't ever need it.

lpshut (The scheduler may not be running ut can't hurt.)
cd /
find ./var/spool/lp ./etc/lp -print | cpio -ocv > /somedir/newlp.cpio

Now on the old box, do an lpstat -t. Note any hung/old jobs and issue cancels for them. There is no point in transferring old print jobs to the new box.
Next, issue an lpshut to stop the scheduler.
cd /
find ./var/spool/lp ./etc/lp -print | cpio -ocv > /var/tmp/lp.cpio
Next using rcp,ftp,tar, or whatever cp /var/tmp/lp.cpio to the new box.

Now back on the new box:
cd /
cpio -icvdum < /var/tmp/lp.cpio

Now we are going to convert the interface files on any of your old JetAdmin network printers.

/opt/hpnpl/bin/transferqueue local
and respond "all" when prompted. This will take a little while.

Now do an lpsched and everything including the default printer should be good to go.

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

Re: How do I copy 2000 printers from one server to another

Back up the spooler configuration to /var/sam/lp/lp.new:

/usr/sam/lbin/lpmgr -S -v -xsavedir=/var/sam/lp/

Tar up the lp.new dir - ftp it to other server, then:

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

You can also just do it in SAM....

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.
Ed Williams_3
Advisor

Re: How do I copy 2000 printers from one server to another

Thanks everyone for replying.

Geoff Wild's reply only works if there are fewer than 1024 printers. I tried that one already.

I used A. Clay Stevenson's reply and with a little extra, it worked! I could not find my old HP10d615.SD JetAdmin software and HP tech support said JetAdmin was no longer supported so they didn't have it either. So I also had to copy over the JetAdmin software from my old system to my new system using:

cd /
find ./opt/hpnp -print | cpio -ocv > /somedir/jetadmin.cpio

The copy of the printers appear to be working on my new system.

Thank you!
A. Clay Stephenson
Acclaimed Contributor

Re: How do I copy 2000 printers from one server to another

If you noticed, I said NOT to use the old JetAdmin; it is obsolete. Find the newer JetDirect software; it is available for download and has support for many newer printers. The transferqueue command will update your interface files for you and the conversion will be transparent and quite painless. You will now use the "hppi" command in pace of "jetadmin".
If it ain't broke, I can fix that.
Ed Williams_3
Advisor

Re: How do I copy 2000 printers from one server to another

I did notice that, but my management told me to make the new system match the old system. Our old system is a production system and the new system is supposed to be a test/devlopment system that initially matches production. Once I'm finished setting up my new system to match my old system, then I can get permission to test upgrades. The only JetDirect software I could find was HP10e134.SD. Is this version good enough for doing a transferqueue and upgrading everything?
A. Clay Stephenson
Acclaimed Contributor

Re: How do I copy 2000 printers from one server to another

Yes, that version of JetDirect will suffice. Part of your job as a SysAdmin is to advise your management when they are being stupid -- you might want to phrase it a bit more diplomatically. You can also inform your management that JetAdmin is not Y2K compliant; that ought to scare 'em. Now that you have it working, a perfectly safe approach would be to do an lpshut and backup /var/spool/lp and /etc/lp to a file. You can then safely install JetDirect and run the transferqueue command. In the worst case, you restore from your backup and all is as it was.

The only feature lost using JetDirect is the xjdm (The Motif printer monitor) is no longer available. Bear in mind, that it's only a matter of time before a new printer is purchased that your present software can't cope with because no suitable interface exists in JetAdmin. Because you did not install JetAdmin via swinstall, you will not be able to remove it via swremove.

If it ain't broke, I can fix that.