1834841 Members
2347 Online
110070 Solutions
New Discussion

Re: Lp interface file

 
John Hegedus
Occasional Advisor

Lp interface file

I have just created a new machine and I want to keep the same printers that were setup on my old machine... can I merely copy the lp interface file or is there something else that has to be done?
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: Lp interface file

There is much more than the interface files.

On the old box:
First do an lpstat -t and note any outstanding/old requests. Remove then via the cancel command as there is no need to transfer these old/stale jobs. Next do an lpshut.

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

Using rcp, ftp, scp copy /var/tmp/lp.cpio from the old box to the new.

On the new box (and I'll assume that you have already installed the JetDirect software):

lpshut # may error if lpsched not running
cd /
find ./var/spool/lp ./etc/lp -print | cpio -ocv > /var/tmp/lp.cpio.save # just to be safe
rm -r /var/spool/lp /etc/lp
cpio -icvdum < /var/tmp/lp.cpio
lpsched

You should be good to go.

If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: Lp interface file

Note that SAM has a save/restore LP configuration commands. If you save on one machine then tar the directory up, then restore on the other, you should be good to go. This is similar to what Clay mentions.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1127082
skt_skt
Honored Contributor

Re: Lp interface file

echo "Saving /var/sam/lp in local..."
#### Save & store printer config info with lpmgr
/usr/sam/lbin/lpmgr -S -xsavedir=/var/sam/lp

then rcp to the remote machine and restore.

### Change ownership of /var/sam/lp to lp:bin , lp:lp
/usr/bin/chown -Rh lp:bin /var/sam/lp
/usr/bin/chown -Rh lp:lp /var/sam/lp/interface
/usr/bin/chown -Rh lp:lp /var/sam/lp/member

cd /var/sam
/opt/tar/bin/gtar -zcpf /var/sam/lp_config.gz lp
scp -p lp_config.gz ${remhost}:/var/sam

ssh ${remhost} -n "export PATH=$PATH:/opt/aCC/bin:/opt/ansic/bin:/opt/tar/bin:/sbin:/usr/5bin:/usr/ccs/bin:/usr/contrib/b
in:/usr/lib;cd /var/sam;/opt/tar/bin/gtar -zxpf lp_config.gz" &

hope this gives an idea.
John Hegedus
Occasional Advisor

Re: Lp interface file

I need to download the JetDirect Software but I'm not sure which to download I went to a site that has roughly 99 entries of JetDirect Software??? Do you know which one I need .. My box is an RP7440 running HPUX 11.11
Peter Nikitka
Honored Contributor

Re: Lp interface file

Hi,

try this link:


http://h20180.www2.hp.com/apps/Nav?h_pagetype=s-001&h_lang=en&h_cc=us&h_product=27349&h_client=S-A-R163-1&h_page=hpcom〈=en&cc=us

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"