1833780 Members
2886 Online
110063 Solutions
New Discussion

printer to define

 
SOLVED
Go to solution
federico_3
Honored Contributor

printer to define

if i would need to define a printer existing on a source server in a target server whitout using jetadmin but copying the configuration files , how could i do this action if it is possible?


Federico

6 REPLIES 6
Varghese Mathew
Trusted Contributor

Re: printer to define

Hi,

Assume "ctxprd" is the source server where the printer is already configured, and "ctxnew" is the target server where you are going to replicate the printer.

Use the attached sript :
You can make use of the script in this way --> assume "mhp12" is the printer you want to replicate to "ctxnew" from "ctxprd" , then execute the script
#sh printer.sh mhp12
this will create the printer in your new machine.

Please do not forget to add the host entry (IP address) of teh printer in the /etc/hosts file.

Hope this helps

Cheers !!!
Mathew
Cheers !!!
Varghese Mathew
Trusted Contributor

Re: printer to define

Hi again,

Oooopps i did'ntsend u the script..
here is it..mkdir /var/spool/lp/request/$1
rcp -p CTXPRD:/etc/lp/interface/$1 /etc/lp/interface
chown lp:bin /etc/lp/interface/$1
rcp -p CTXPRD:/etc/lp/interface/model.orig/$1 /etc/lp/interface/model.orig
chown lp:bin /etc/lp/interface/model.orig/$1
rcp -p CTXPRD:/etc/lp/member/$1 /etc/lp/member
chown lp:lp /etc/lp/member/$1 /var/spool/lp/request/$1
rcp -p CTXPRD:/var/spool/lp/?status /var/spool/lp
## rcp -p CTXPRD:/etc/hosts /etc
/usr/sbin/lpshut
/usr/sbin/lpsched

--------------------
Thats all

Cheeers !!!
Mathew
Cheers !!!
federico_3
Honored Contributor

Re: printer to define

Could you explain me what is the meaning of /var/spool/lp/qstatus and pstatus and why i should copy also these files that, if i'm not wrong, are strictly related to the printers defined on the server.
Varghese Mathew
Trusted Contributor

Re: printer to define

Hi,

You are right, that gives problem. Anyone else has got some other ideas.

But if we don't copy those ?status files, it doesn't work at all...

Cheers !!!
Mathew
Cheers !!!
federico_3
Honored Contributor

Re: printer to define

This way i should copy the status files from a server ( that contains about 200 hundred of printers ) to another one ( with only few printers configured), ... and if in these new files there is no reference about the printers defined in the target server, will all be OK ( That is, will the printers already defined in the target sever work properly? )
Vincent Stedema
Esteemed Contributor
Solution

Re: printer to define

Hi Federico,

I found a thread which thoroughly explains which files are important to the printer subsystem and why. Here it is: http://aa11.cjb.net/hpux_admin/2000/01/0450.html

Why don't you use the addqueue program which ships with jetadmin? In stead of using several rcp's to transfer a printer configuration you can set up a new printer on a remote system ine one remsh....

Regards,

Vincent