1833995 Members
2615 Online
110063 Solutions
New Discussion

Re: Printers

 
Sean Furman_1
Advisor

Printers

We recently had a 10.20 Server go down that had a lot of printers setup in it. We can access the root of the bad filesystem of the corrupt 10.20 system. We would like to copy a file from the 10.20 that is busted to our good install that would contain the printers in it. Any help would be appreciated.
13 REPLIES 13
Sridhar Bhaskarla
Honored Contributor

Re: Printers

Hi Sean,


If you can access the directories /etc/lp, /var/adm/lp, /var/spool/lp on the old system then you can tarup these directories and untar them on your system. Make sure take a backup of the current directories on the new OS.
Once it is done, do an "lpsched" and you should see all the printers.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Tully
Honored Contributor

Re: Printers

Check this posting:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4d7c402f24d5d61190050090279cd0f9,00.html

Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
Anyone for a Mutiny ?
A. Clay Stephenson
Acclaimed Contributor

Re: Printers

It's fairly easy but it does require that you are able to access /etc and /var/spool/lp on the old drive.

1) On the new box, install the latest JetDirect software. (Even if you were running JetAdmin on the old box OR even if you've upgraded to 11.x, install the JetDirect software - we will deal with that shortly).

2) On the new box, lpshut.
cd /
find ./etc/lp ./var/spool/lp -print | cpio -ocv > /tmp/newlp.cpio

We shouldn't need this backup but that's why we make it - so we won't need it.

3) vgimport the old vg00 disk(s), vgchange -a y, and mount the old vg00 filesystem. Let call the old /, /oldroot and the old /var, /oldvar. You will only need those two filesystems.

4) cd /oldroot/etc.
find lp -print | cpio -ocv > /tmp/etclp.cpio

5) cd /oldvar/spool
find lp -print | cpio -ocv > /tmp/varlp.cpio

6) Umount /oldroot ands /oldvar and vgchange -a n , and vgexport the old vg00. We don't need it anymore.

7) cd /etc
cpio -icvdum < /tmp/etclp.cpio

8) cd /var/spool
cpio -icvdum < /tmp/varlp.cpio

9) If you converted from JetAdmin JetDirect (like you should):

transferqueue local
and respond 'all'.
This will convert your interface scripts.

10) lpsched

You are done and all is restored - even the default printer.

This does assume that you have already addressed all hostname resolution problems.
If it ain't broke, I can fix that.
Sean Furman_1
Advisor

Re: Printers

Can you guys help me with backing up the directories that you mentioned?
A. Clay Stephenson
Acclaimed Contributor

Re: Printers

Okay, it seemed that you were replacing drives but if you have the original boot disk mounted on another box then it's even easier.

1) Execute lpshut on the old box.

2) cd /
find ./etc/lp ./var/spool/lp -print | cpio -ocBv > /dev/rmt/0m.

(or whatever is the appropriate tape drive).

3) On the new box (again, after using swinstall to install the latest JetDirect software), execute lpshut. (The scheduler may not have been running but no harm).

4) Let's make a safe backup of the new first.

cd /
find ./etc/lp ./var/spool/lp -print | cpio -ocBv > dev/rmt/0m

5) Now insert the old system's media in the drive and let's restore to the new box.

cd /
cpio -icBvdum < /dev/rmt/0m


6) Time to run tranferqueue local and answer "all" - if converting from JetAdmin to JetDirect.

7) lpsched

If it ain't broke, I can fix that.
Sean Furman_1
Advisor

Re: Printers

How come we need the Jet Direct Softare? Also, the drives from the down server are already mounted in the good server and I have a mount point to the root of the boot drive from the bad server. Can I do this without the Jet Direct Software? Will I be missing out on anything.
Sean Furman_1
Advisor

Re: Printers

In addition, I am trying to download the HP Jet Admin Software from hp.com and they are saying that it is obsolete and no longer available on their site. Please Advise.
A. Clay Stephenson
Acclaimed Contributor

Re: Printers

1) JetAdmin is completely obsolete and unsupported.

2) It's not Y2K compliant.

3) At the very least, you would have to (or really, really should) have to install JetAdmin using swinstall to keep the new software database up to date. Since you have to (really, really should) run swinstall anyway, you might as well run swinstall and install JetDirect it's no more difficult assuming you can even find a .depot for JetAdmin.

4) Support for newer printer models.

5) Finally, there is absolutely no downside to the conversion to JetDirect and the transferqueue command will convert all your interface files within minutes.
If it ain't broke, I can fix that.
Sean Furman_1
Advisor

Re: Printers

We are confused... Where do we find the Jet Admin if it is discontinued? I do not think that we used it before with the old system? Can we do what we want without the Jetadmin software? We are desperately trying to import the printers from our old root file system that is alredy mounted. Please advise.
A. Clay Stephenson
Acclaimed Contributor

Re: Printers

It's very likely that since you were running 10.20 (which itself obsoltes this month) that you are running JetAdmin.

If on the old box, you have a directory called /opt/hpnp (JetAdmin) rather than /opt/hpnpl (JetDirect) then you are running JetAdmin. You could conceivably have both but in that case the later JetDirect was installed and used.

Since you have the drives mounted on the new system, use my original method and you are home free - substituting your appropriate filsystem mountpoints for /oldroot and /oldvar.

The only difference is that using JetAdmin, the printer install/maintenance command was "jetadmin" and now it's "hppi".

As a first step, download the JetDirect software and install it using swinstall - that should take you less than 10 minutes including the download time - given a reasonable connection to hp.com. You can always run swremove to blow it away.

If it ain't broke, I can fix that.
Sean Furman_1
Advisor

Re: Printers

First off, I would like to thank you for all of your help so far. The directory(s) that you mentioned to not exist in the /opt on the old filesystem. I guess that is why our printers are so slow. They company that supports our software is messing with us. They do not know how to properly setup the printers.
Let me know what you think. Also, I cannot find the Jet Direct Software. In my opt directory on the new server, I have a webadmin folder. Is that anything of interest?
A. Clay Stephenson
Acclaimed Contributor

Re: Printers

If you are missing the /opt/hpnp directory then
1) it's not there because the disk is corrupt, or 2) you weren't using network printers at all. You might be using "Remote" printers - those are diffrent from "Network (JetAdmin or JetDirect) printers. It's also possible that all your printers are directly attached serial or parallel devices.

If you were using remote printers (or local direct attached printers) then on the new box do an lpshut and copy the /etc/lp and /var/spool/lp backups into the new box. Next cd to /var/spool/lp and remove SCHEDLOCK and *FIFO*. Those files may not be found but the scheduler will not start if any of those files are found. Next, do an lpsched. If you can print, you are fixed. Again, hostname resolution must be working so get /etc/hosts, or NIS, or DNS working.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: Printers

If you ever "backed up your spooler configuration" either in SAM or on the command line: /usr/sam/lbin/lpmgr -S -v -xsavedir=/var/sam/lp/

Then you may be okay by just copying the /var/sam/lp dir from your old system to your new one and "restore spooler configuration" in SAM or on the command line:
/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp/

Rgds...Geoff

PS: This ios the software you want:

HPNPL E.10.18 Hewlett-Packard JetDirect Printer Installer for Unix
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.