Operating System - HP-UX
1830735 Members
1723 Online
110015 Solutions
New Discussion

Way to copy printer definitions?

 
SOLVED
Go to solution
George A Bodnar
Trusted Contributor

Way to copy printer definitions?

Does anyone know of a way to copy printer definitions between 2 like servers? I thought there were some postings on this already, but have not been able to find them.

This is for clustered servers as well as a few application servers that are not clustered.

The goal would be to be able to "copy" printers and migrate as required without having to run the applications that built these definitions on each node.
8 REPLIES 8
Sandip Ghosh
Honored Contributor
Solution

Re: Way to copy printer definitions?

There is a command transferqueue in hpux. If you do man transferqueue it will give you details.

Sandip
Good Luck!!!
Ian Dennison_1
Honored Contributor

Re: Way to copy printer definitions?

There is a JetAdmin command called 'addqueue' that was supposed to give great results.

I never managed to get it to work in 12 months of on-and-off trying, so gave it away.

Did your search come up with any finds in the Forums? Sometimes no results come up at all, which means that the search did not look in the forums, not that there were no finds for the text.

Share and Enjoy! Ian
Building a dumber user
George A Bodnar
Trusted Contributor

Re: Way to copy printer definitions?

I'll be back to post points - I don't want this to close with a "bunny" yet. The transferqueue and addqueue tools looks promising - at minimal we may just steal the logic.

I did try doing a search without any luck on migrating printer definitions - lots of creating printers but not cloning, copying, etc.

I thought someone had posted something about wanting to clone printers to backup nodes in a cluster fairly recently.
A. Clay Stephenson
Acclaimed Contributor

Re: Way to copy printer definitions?

While you can copy /var/spool/lp & /etc/lp to other servers, the easier method is to use SAM ->Printers & Plotters ->LP Spooler -> Save/Restore Spooler Configuration.

The 'Save' will store the data in /var/sam/lp. Copy that directory to another host and do the Restore.

It is important that all boxes be on the same version of JetDirect software. If you attempt to copy the older jetadmin print queques to a box with the newer hppi spooler software then you are not going to work. The tranferqueue command can be used to convert the older to the newer before you transfer the data saved by SAM.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: Way to copy printer definitions?

Beter yet, it sounds like you have a SAP installation.

My config is like this:

3 App servers

In cluster: 2 DB servers, 2 CI servers

I created a "printing" package on one of the CI servers then the other boxes just print to it via a remsh script. No hassles....no mess...

Let me know if you want some more details...

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.
George A Bodnar
Trusted Contributor

Re: Way to copy printer definitions?

I think the transferqueue script (or possibly the SAM command that SAVE/RESTORE uses) for what we are trying to do.

I wish we could do something like the remsh to a central printer server, but we are stuck with a number of clusters (different applications) that we want to keep synched.

The real downside is both of these options require lpsched to get shutdown, but I guess that is more a limitation of the spooler system than anything else.
fg_1
Trusted Contributor

Re: Way to copy printer definitions?

Hello there

I just got done using transferqueue to duplicate over 600 network based printers.

The process is:
Transferring JetAdmin created queues from
P-UX 10.x/11.x to HP-UX10.x/11.x
-----------------------------------------------
1. Login to the workstation (Source)as
'root' user from which the queues are to be
transferred.

2. Change directories to /etc/lp/interface
and remove old queues by executing "rm *.old"
and remove the files which are not used as queues.

3. tar the queues by executing:
'tar -cvf /tmp/queues.tar *'.

4. Transfer the file '/tmp/queues.tar' to
the '/tmp' directory of destination workstation (to which the queues are to be
(transferred) by executing the following commands.

ftp
enter 'root' as a user
enter 'root' user password
cd /tmp
bin
put /tmp/queues.tar
bye

5. Login to the destination workstation as
root user.

6. Make sure that you have JetAdmin
installed - Same version as source
workstation or later version of JetAdmin.

7. Make sure that queue names on the
source workstation do not conflict with
the queuenames on the destination
workstation.

If same queuenames exist on both workstations,
then the one on the destination workstation
will be overwritten by the source workstation's queue.


8. If you are using a host table - check
to see if the proper /etc/host
entries exists on the destination workstation for the queues you are transfering.

9. If you are using bootp - make sure the /etc/bootptab entries are available on
the destination workstation.

10. Execute:
script '/opt/hpnp/bin/transferqueue'. This will create and install the queues on
destination workstation with the same name
as in the source workstation with same set
of options.

11. Set the default queue (if it is necessary) by executing 'lpadmin -d.

12. Install Jetadmin (D.05.20 or later)
if it is not installed already to print
with the transferred queues.


Hope this helps.

GL.

Ted Ellis_2
Honored Contributor

Re: Way to copy printer definitions?

maybe you are done with this and happy, but if you are running jetadmin on the servers, you can upgrade to hppi... basically the next gen of jetadmin. That is where the transferqueue command/script comes from. Here is the link to the product... the upgrade was a snap and moving printer queues between servers is very simple:

http://www.hp.com/cposupport/networking/support_doc/bpj06084.html

Ted