1752778 Members
5871 Online
108789 Solutions
New Discussion юеВ

Re: printers

 
SOLVED
Go to solution
Jeff Hagstrom
Regular Advisor

printers

I have setup a test box and would like to bring over all the users and the printers. Both boxes are hp9000 running hp/ux 11.00. What are all do I need to bring over to make the printers available on both boxes?
8 REPLIES 8
Mark Grant
Honored Contributor

Re: printers

Assuming you are not using Openspool or some other printing horror.


Copy over the following directories

/var/spool/lp
/etc/lp

Stop the scheduler with "lpshut", restart it with "lpsched".

If they are network printers and are not in "DNS", put them in /etc/hosts.

I think thats about it.
Never preceed any demonstration with anything more predictive than "watch this"
Mister_Z
Frequent Advisor

Re: printers

Hi Jeff,

I attach a procedure to migrate the spooler system.

HTH,
I work for HP
Jeff Schussele
Honored Contributor

Re: printers

Hi Jeff,

And for users you'll need:

1) /etc/passwd
2) /etc/group
3) /home #or wherever you keep you home dirs
4) /tcb #IF running Trusted. Will need entire tree below.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Helen French
Honored Contributor

Re: printers

You can also copy the printer defenitions using SAM:

sam -> printers and plotters -> lp spooler -> Save/restore spooler configuration.

If you are using Jetdirect/jetadmin software, check the transferqueue command too.
Life is a promise, fulfill it!
Jeff Hagstrom
Regular Advisor

Re: printers

Juan: I wanted to use sam to save the printers, but where does it get saved to? I need to move all the printers to another box and restore them there? What files are saved and where? And do they get put back in the same place to restore them?
Mister_Z
Frequent Advisor

Re: printers

Using the command line:

To backup the spooler system (export):
#/usr/sam/lbin/lpmgr -S -xsavedir=/var/sam/lp

this will create a file with all the spooler configuration under "/var/sam/lp". Just ftp it to the system where you want to migrate the spooler to (.i.e the same directory). In this system you have to issue:
#/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp

to import the spooler data.
I work for HP
Helen French
Honored Contributor
Solution

Re: printers

For your last question about saving files with SAM:

When you choose the action - Save spooler configuration, it will save the necessary information to /var/sam/lp directory. Transfer this directory to the new system (through network or tape) on the same location. Then do a Restore configuration there from SAM.

You need to make sure that the device files and locations of printer are same at both places. Also when you transfer the files, make sure that the files are with the same permissions.
Life is a promise, fulfill it!
Mister_Z
Frequent Advisor

Re: printers

the lpmgr -S command creates a set of files and directories (not a single file):

#/usr/sam/lbin/lpmgr -S -xsavedir=/var/sam/lp
#ls -ltr /var/sam/lp
total 12
drwxrwxrwx 3 root sys 1024 Nov 11 16:45 member
drwxrwxrwx 2 root sys 1024 Nov 11 16:45 cinterface
drwxrwxrwx 2 root sys 1024 Nov 11 16:45 sinterface
drwxrwxrwx 2 root sys 96 Nov 11 16:45 class
drwxrwxrwx 2 root sys 96 Nov 11 16:45 dev
drwxrwxrwx 3 root sys 1024 Nov 11 16:45 interface
-rw-rw-rw- 1 root sys 261 Nov 11 16:45 lpinfo
-rwxr-xr-x 1 root sys 0 Nov 11 16:45 default
-rw-rw-rw- 1 root sys 18 Nov 11 16:45 timestamp


Just tar it to one file using:
#cd /var/sam/lp
#tar cvf ./lp.tar .

and ftp it to the other system. Before using
lpmgr -R, untar the file lp.tar to the directory /var/sam/lp


You can also tar the contents of the /var/sam/lp directory of the exporting system to a tape
#cd /var/sam/lp
#tar cvf /dev/rmt/0m .

and restore the data in the target server:
#cd /var/sam/lp
#tar xvf /dev/rmt/0m
I work for HP