Re: Moving printer config to a new host (361 Views)
Reply
Frequent Advisor
Rikki hinn Ogurlegi
Posts: 71
Registered: ‎08-22-2002
Message 1 of 5 (386 Views)

Moving printer config to a new host

Hi all.

 

I'm trying to replace a very old system running HP-UX 11.00 with a less old system running a fresh installation of 11.23 (These are old L class systems so no 11.31).   My problem is that the old 11.00 system has over 300 printers configured that need to be moved over to the 11.23 system.

 

I've tried copying /etc/lp and /var/spool/lp over with very limited success.   I tried SAM's backup and restore configuration (backup on the 11.00 server, scp the backup folder over to the 11.23 system and restore from it) with even less success (spooler is empty on restore) so I am at a loss.

 

It's going to be a horrible task to manually have to define all those printers on the new system so I was wondering if anyone here had any ideas on how I could accomplish this task without major work on my part.

 

Thanks in Advance.

Richard.

Please use plain text.
Honored Contributor
rariasn
Posts: 1,135
Registered: ‎08-09-1999
Message 2 of 5 (379 Views)

Re: Moving printer config to a new host

Hi:

11.00 server:

# umask 022
# mkdir /tmp/lp
# /usr/sam/lbin/lpmgr -S -v -xsavedir=/tmp/lp
# tar /tmp/lp.tar /tmp/lp
# scp -p /tmp/lp.tar server1131_name:/tmp

11.31 server:

# umask 022
# tar xvf /tmp/lp.tar
#lpshut
#/usr/sam/lbin/lpmgr -R -v -xsavedir=/tmp/lp
#lpsched -v
#lpstat -v

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,950
Registered: ‎03-06-2006
Message 3 of 5 (375 Views)

Re: Moving printer config to a new host

>I tried SAM's backup and restore configuration

 

Did you do something like rariasn mentioned?

lpmgr may not handle network printers correctly, do you have those?

Please use plain text.
Frequent Advisor
Rikki hinn Ogurlegi
Posts: 71
Registered: ‎08-22-2002
Message 4 of 5 (363 Views)

Re: Moving printer config to a new host

Hi and thanks for the reply's

 

When I used SAM's backup and restore I used it from the GUI.   I ren the commands you gave.  PS1 (command prompt) is set to "1100# " on the 11.00 host and "1123# " on the 11.23 host.   Commands and results follow:

 

1100# umask 022
1100# mkdir /tmp/lp
1100# /usr/sam/lbin/lpmgr -S -v -xsavedir=/tmp/lp
1100# tar cf /tmp/lp.tar /tmp/lp
1100# scp -p /tmp/lp.tar 192.168.167.46:/tmp/
lp.tar                    |      13210 KB | 2201.7 kB/s | ETA: 00:00:00 | 100%

 

then:

 

1123# cd /tmp
1123# tar xf lp.tar
1123# lpshut
lpshut: scheduler not running
1123# /usr/sam/lbin/lpmgr -R -v -xsavedir=/tmp/lp
A problem occurred doing "lpadmin -pCanonGP_pr -i/tmp/lp/interface/CanonGP_pr -v/dev/null -ormCanonGP -orppr1 -oci/tmp/lp/cinterface/CanonGP_pr -osi/tmp/lp/sinterface/CanonGP_pr  ". Stderr from this command is "/usr/sbin/lpadmin: can't access file "/tmp/lp/sinterface/CanonGP_pr"".
A problem occurred doing "lpadmin -pmicroline_1 -i/tmp/lp/interface/microline_1 -v/dev/null -ormsamband.kea.is -orpmicroline_1 -oci/tmp/lp/cinterface/microline_1 -osi/tmp/lp/sinterface/microline_1  ". Stderr from this command is "/usr/sbin/lpadmin: can't access file "/tmp/lp/sinterface/microline_1"".
1123# lpsched -v
scheduler is running
1123# lpstat -v | wc -l
299

 

Worked like a charm apparently! :)

 

Thank you so very much for saving my bacon on this one :)

 

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,950
Registered: ‎03-06-2006
Message 5 of 5 (361 Views)

Re: Moving printer config to a new host

>Worked like a charm apparently!

 

Did these two printers get installed?

can't access file "/tmp/lp/sinterface/CanonGP_pr".
can't access file "/tmp/lp/sinterface/microline_1".

 

Do these files exist?

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation