1834191 Members
2629 Online
110064 Solutions
New Discussion

Re: copying print queues

 
SOLVED
Go to solution
Ranjith P B
Occasional Advisor

copying print queues

Hi Friends,

I have few network printers configured through jetadmin.Now I want to cofigure all these printers to other server.What is the best method to do this..??

I tried copying /etc/lp/interface/ to new box and restarted the scheduler.But the lpstat shows "not a destination."
Is ther any other files I need to copy..????

Please help...
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: copying print queues

There is a lot more that needs to be copied and maintaining mode, ownership, and group is also crucially important.

First, make sure that you have hostname resultion working on both boxes (modify /etc/hosts, DNS, NIS, NIS+ as appropriate to your environment so that printer hostnames can be resolved.)

Next, if you have not done so already, install the JetDirect software on the destination server so that you have the necessary software for the Network printers.

On the original box:
1) lpstat -t and note any hung/running jobs; use the cancel command to cancel them.
2) lpshut # stop lp subsystem
3) cd /
find ./etc/lp ./var/spool/lp -print | cpio -ocv > /var/tmp/lp.cpio
4) lpsched # restart lp subsystem
5) Using ftp, rcp, sftp, ... copy /var/tmp/lp.cpio from the original to the destination box.

On the destination box:
1) lpshut
2) cd /
find ./etc/lp ./var/spool/lp -print | cpio -ocv > /var/tmp/lp.save.cpio # just in case
3) cpio -icvdum < /var/tmp/lp.cpio
4) lpsched

Now your entire lp subsystem should be copied and working.
If it ain't broke, I can fix that.
Juan M Leon
Trusted Contributor
Solution

Re: copying print queues

Ranjith,
I ran into the similar situation with the SAP team. They wanted to copy the queues from a server to another sap server.
I have a script that generates the list of printers and creates a config file.
then on the destination server you only run the script with config file and it duplicates the print queues with the same information as the source server.

I will suggest to use the GENERATE_QUEUE_LIST
section. Then once the config file is created use the ADD_JetAdmin_QUEUES section.
hope it helps.

good luck
Juan M Leon
Trusted Contributor

Re: copying print queues

The intial configuration file should look something like the following attachement
Rita C Workman
Honored Contributor

Re: copying print queues

Clay has probably given you the best methodology for doing this.

Haven't done this in ages, but think in past I did something like this:

cd /var/sam/lp
tar cvf -printer.tarfile /var/sam/lp

rcp that tarfile to the second server at /var/sam/lp
tar xvf -printer.tarfile

Confirm your printers are there in SAM.

Seems to me that I also rcp the /etc/lp/interfaces -or- I think you can run:
/opt/hpnpl/bin/transferqueue local and answer "all"

Just a thought,
Rita
Ranjith P B
Occasional Advisor

Re: copying print queues

Thanks friends..I will try with the scripts.