1833873 Members
2232 Online
110063 Solutions
New Discussion

Re: Moving Printers...

 
SOLVED
Go to solution
Ty Roberts
Frequent Advisor

Moving Printers...

Does anyone know if it is possible to "copy" printers between several servers? We have an environment where we need the SAME printers on 5 servers. Instead of using HPPI to create the printers on each of the servers is there a way to just copy the files between?? If do you know the listing of ALL the files that need to be moved..

I am hoping this will save me some typing and some repetitive work...

Thanks,
Ty
6 REPLIES 6
Dave Chamberlin
Trusted Contributor

Re: Moving Printers...

There are a couple of ways to do this. Do a search in this forum for "restore spooler". There are several posts that give the details.
MANOJ SRIVASTAVA
Honored Contributor

Re: Moving Printers...

Hi Ty


you may like to look at this document :

http://support2.itrc.hp.com/service/cki/docDisplay.do?docId=200000058668757


Manoj Srivastava
A. Clay Stephenson
Acclaimed Contributor

Re: Moving Printers...

There are 2 methods:

1) Use SAM->Printers & Plotters -> LP Spooler -> Save/Restore Spooler Configuration -> Actions -> Save (or Restore)

You then copy the files under var/sam/lp to the other hosts and run the Restore.

2)
Copy /etc/lp/*, /var/spool/lp/* (and make sure that the proper symbolic links are maintained /usr/spool -> /var/spool. MAKE CERTAIN that ownership and group are maintained.

2B) You could use rdist to keep these files in sync.
If it ain't broke, I can fix that.
Sandip Ghosh
Honored Contributor

Re: Moving Printers...

There is a command called "transferqueue", it will transfer all the queue to other Server.
For details look at
#man transferqueue

Sandip
Good Luck!!!
Rich Wright
Trusted Contributor

Re: Moving Printers...

Here is a script that I use. I create the print queue on the "$FR_HOST" server that usually has no printing activity going on.
Then I run this script that will watch for an idle moment and make the change with minimal effect on the ongoing printing that "lpshut/lpsched" causes.

#!/bin/sh
FR_HOST=source_host
PR=$1
MM=$(date +%b)
DD=$(date +%d | sed 's/^0//')
while [ $(lpstat -o -i | grep -E "$MM[ ]+$DD[ ]+.*on" | wc -l) -gt 0 ]
do
echo ".\c"
sleep 5
done
echo ""
if [ $(hostname) != ${FR_HOST} ];then
rcp ${FR_HOST}:/etc/lp/interface/${PR} /usr/spool/lp/model/${PR}
rcp ${FR_HOST}:/etc/lp/interface/model.orig/${PR} /etc/lp/interface/model.orig/${PR}
if [ $? -ne 0 ];then
echo "model script for ${PR} not available"
echo "rcp from ${FR_HOST}:/usr/spool/lp/model/${PR} FAILED"
exit 1
fi
fi
lpshut
lpadmin -x${PR}
lpadmin -p${PR} -m${PR} -v/dev/null
lpsched -a
accept ${PR}
enable ${PR}
rm /usr/spool/lp/model/${PR}
exit
Bill Hassell
Honored Contributor
Solution

Re: Moving Printers...

As mentioned, transferqueue is a good way to copy the queues. You can also use addqueue in a script since addqueue only needs 2 parameters: hostanme/IP and queue-name. The run the script on each machine. addqueue is by far the easiest way to add a JetDirect printer.


Bill Hassell, sysadmin