1825766 Members
2168 Online
109687 Solutions
New Discussion

Migrating Printers

 
SOLVED
Go to solution
Philip Dunn_1
Frequent Advisor

Migrating Printers

Hi to all, hope your friday is going well...?
Having a small issue after migrating some printers from an 11.0 box to 11.11.

Copied /var/sam/lp direcory to new server and imported using sam save/restore option.

All print queues now exist on the new box, but unfortunately non of them print.

if i delete and recreate a single queue it prints fine, any ideas to resolve all print queues?

thanks for any help you can give

Phil
7 REPLIES 7
IT_2007
Honored Contributor

Re: Migrating Printers

I think you need to tar /var/spool/lp and restore it.
Geoff Wild
Honored Contributor

Re: Migrating Printers

Can't do it that way - you have to:

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

tar up /var/sam/lp/ and copy to new server...

un tar on new then:

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

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.
Jonathan Fife
Honored Contributor

Re: Migrating Printers

Do files go into the queues but just sit there, or are you unable to queue items? Do the queues show as enabled?

Did you restart the lpsched process? (lpshut && lpsched)

Is there anything in /var/adm/lp/lpd.log?
Decay is inherent in all compounded things. Strive on with diligence
Jim Purtell
Frequent Advisor

Re: Migrating Printers

Phil,
I've been down this road in the past. Who wants to recreate 200+ printer on another machine, right. Well, here you go.

cd /opt/hpnpl
and read the 'TRANSFER.UNX' file. It will explain everything you need to do to transfer all your printers from 10.x to 11.x / 11.x to 11.x / 10.x to 10.x etc. But it will not transfer to Solaris from HP. They have to be of simalar os's for it to transfer properly.

In breif these are the steps you'll have to take.

1) login to the source system.
cd /etc/lp/interface
rm *.old

2) cd /opt/hpnpl/bin
./transferqueue backup

3) ftp the file /tmp/queues.tar to
the destination/target
machine /tmp/queues.tar

4) login to the target machine
cd /opt/hpnpl/bin
./transferqueue

This should transfer all your printers from one machine to the other.

Good luck and let us know how you make out.
Have a great weekend
Jim
Jim Purtell
Frequent Advisor
Solution

Re: Migrating Printers

Phil,
I've been down this road in the past. Who wants to recreate 200+ printers on another machine, right. Well, here you go.

cd /opt/hpnpl
and read the 'TRANSFER.UNX' file. It will explain everything you need to do to transfer all your printers from 10.x to 11.x / 11.x to 11.x / 10.x to 10.x etc. But it will not transfer to Solaris from HP. They have to be of simalar os's for it to transfer properly.

In breif these are the steps you'll have to take.

1) login to the source system.
cd /etc/lp/interface
rm *.old

2) cd /opt/hpnpl/bin
./transferqueue backup

3) ftp the file /tmp/queues.tar to
the destination/target
machine /tmp/queues.tar

4) login to the target machine
cd /opt/hpnpl/bin
./transferqueue

This should transfer all your printers from one machine to the other.

Good luck and let us know how you make out.
Have a great weekend
Jim
Bill Hassell
Honored Contributor

Re: Migrating Printers

The transferqueue command will only work on printers that were defined with the hppi command, that is, the printer has an HP JetDirect LAN card. The other two possibilities, direct-connect (serial or parallel), and remote print servers (PC-based, Linux or Unix-based, or non-HP printer LAN cards) will not be transferred. There are MANY different directories maintained by the spooler (/var/spool /etc/lp /var/adm/lp /usr/lib/lp) and some of the control and status files may be incompatible with newer versions of HP-UX.

So the sam lpmgr is the only way to replicate the spooling system on another machine (without writing a couple of scripts). Note that SAM is the recommended way to save or restore the configuration but by examining SAM's log, the actual task uses lpmgr. NOte that lpmgr will preserve direct-connect, remote and network printers but will *NOT* preserve any print jobs that are pending.


Bill Hassell, sysadmin
Philip Dunn_1
Frequent Advisor

Re: Migrating Printers

Thanks for all the help guys, in the end I used Jims reccomendation of the transferqueue script.
Although advice I can give is if the TRANSFER.UNX file tells you to tar up the /etc/lp/interface directory, do it like this instead... "tar -cvf /tmp/queues.tar `grep hpnp * | awk -F':' '{print $1}' | uniq` model.orig/*"
or you will tar up the lost+found directory and the import will fall over!
thanks again

Phil