1831352 Members
3111 Online
110024 Solutions
New Discussion

Printers Question

 
SOLVED
Go to solution
jcrowe
Occasional Contributor

Printers Question

I have a server A with 20 remote printers configured. I have add the same 20 printers to server B.This is what i have done..
1. copy /etc/lp directory
2. copy /var/spool/lp directory
3. copied the /etc/hosts (printer entries) to Server B.

started the lpsched after removing the FIFO and SCHEDLOCK files. lpstat -t and lpstat -a reports fine. but when i issue a print job with lp -dP028 fileA
lp: destination "P028" non-existent. I am getting the same error for all the 20 printers. Please advice

Thanks

Jeff
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Printers Question

Copy won't get the job done because lp is extremely sensitive to file ownership/group/mode. You need a mechanism that will preserve all of this:

On Server A:
cancel any outstanding/old print jobs
lpshut
cd /
find ./etc/lp ./var/spool/lp -print | cpio -ocv > /var/tmp/lp.cpio

Next rcp/ftp /var/tmp/lp.cpio from Server A to Server B.

I'll assume that you have installed JetDirect Software (if needed) and have hostname resolution (/etc/hosts, NIS, DNS) working on Server B.

On Server B:
lpshut
Look for any lpsched processes and kill them
although there probably will be none.


cd /
find ./etc/lp ./var/spool/lp -print | cpio -ocv > /var/tmp/lp.cpio.orig # just in case
rm -r ./etc/lp ./var/spool/lp
cpio -icvdum < /var/tmp/lp.cpio
lpsched

Now everything (including the default destination) should be good to go.
If it ain't broke, I can fix that.
Haniza
Advisor

Re: Printers Question

Hi Jeff

You could also try copy (tar) the following directories from server A to server B:
/usr/lib/lp
/etc/lp
/var/spool/lp

Rgds.
Jose Mosquera
Honored Contributor

Re: Printers Question

Hi Jeff,

Pls try this spool replication procedure:
On primary node:
#/usr/sam/lbin/lpmgr -S -xsavedir=/var/sam/lp
#cd /var/sam
#tar -cf spool_image.tar lp/
...transfer the "spool_image.tar" file to secondary node.

On secondary node:
Ensure that transferred spool_image.tar file is placed on /var/sam directory, then:
#lpshut
#tar -xf spool_image.tar
#/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp
#lpsched

Rgds.