Operating System - HP-UX
1837202 Members
3051 Online
110115 Solutions
New Discussion

Re: Looking for a script to move printers from one box to another

 
Dan Maul
Trusted Contributor

Looking for a script to move printers from one box to another

Hello All,

We have upgraded a server to HP-UX 11.i and are in need of a script to pull the printers from another 11.i to one we just upgraded. Does anybody have one?

Thanks!
I always keep a supply of stimulant handy in case I see a snake--which I also keep handy.
4 REPLIES 4
G. Vrijhoeven
Honored Contributor

Re: Looking for a script to move printers from one box to another

Hi,

I do not have one, but.
If you use SAM, you are able to make a backup of the printer config.
( SAM ==> Printers and Plotters ==> lp spooler ==> Save/Restore Spooler Configuration)
backup.

The files will be backuped in /var/sam/lp

Copy that backup to an other server and use sam on that server to Retore the backup.
Check the sam log for commands if you want to create a script,

Warning a restore deletes all currectly configured printers...

HTH,

Gideon
Geoff Wild
Honored Contributor

Re: Looking for a script to move printers from one box to another

/usr/sam/lbin/lpmgr -S -v -xsavedir=/var/sam/lp/ ; cp -r -p /var/sam/lp/lp.new/* /var/sam/lp/

tar -cvf lp.tar /var/sam/lp/

ftp that tarball to other system

then on that system:

tar -xvf lp.tar

/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp/

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.
Jeff_Traigle
Honored Contributor

Re: Looking for a script to move printers from one box to another

Is there really any benefit to using lpmgr? It looks like it just additional steps to the process of moving the printers without any value added. Simply making a tarball of /etc/lp and /var/spool/lp works just as well (and in some cases better since I've seen lpmgr fail) and seems to be all lpmgr is collecting into that one directory.
--
Jeff Traigle