- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Import/Export printers from a server to another on...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2004 06:22 AM
10-06-2004 06:22 AM
Import/Export printers from a server to another one...
I have some cluster that on them the list of defined printers is not the same on each node. I want that the list of my printers be the same on each node, and I don't want to recreate each printers...
Do anyone know how to do it?? Can I merge the list of defined printers??
Thanks
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2004 06:26 AM
10-06-2004 06:26 AM
Re: Import/Export printers from a server to another one...
Execute
-> SAM
-> Printers and Plotters
-> Lp Spooler
-> Save/Restore Spooler Configuration
Choose
-> Actions
-> Save Spooler Configuration
This will save all the information necessary to rebuild the spooler into the
directory /var/sam/lp.
Tar this directory (/var/sam/lp) :
# tar cvf /tmp/lp.tar /var/sam/lp
Copy the resulting tar file, lp.tar, onto the target system.
Unpack the lp.tar file on the target system :
# tar xvf lp.tar
Execute
-> SAM
-> Printers and Plotters
-> Lp Spooler
-> Save/Restore Spooler Configuration
Choose
-> Actions
-> Restore Spooler Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2004 06:28 AM
10-06-2004 06:28 AM
Re: Import/Export printers from a server to another one...
You can use SAM to save your printer config and then copy it to the other server and restore it with SAM.
I like to use a simple little script, though. Build a list of the printers on the one system that is going to be source - you can use lpstat and edit the output. Then the script is just a for loop. My version is attached.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2004 06:30 AM
10-06-2004 06:30 AM
Re: Import/Export printers from a server to another one...
/usr/sam/lbin/lpmgr -S -v -xsavedir=/var/sam/lp/
cp -r -p /var/sam/lp/lp.new/* /var/sam/lp/
tar up /var/sam/lp/ and ftp to remote server.
On remotes, un tar the tarball, then:
lpshut
/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp/
lpsched -v
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2004 06:34 AM
10-06-2004 06:34 AM
Re: Import/Export printers from a server to another one...
The steps to replicate are quite simple.
1) On the "perfect" host, do an lpstat -t and look for any hung/bad printjobs and cancel them. There is no need to copy these old jobs.
2) lpshut
3) cd /
find /var/spool/lp /etc/lp -print | cpio -ocv > /var/tmp/lp.cpio
4) lpsched
5) On the destination host:
lpshut
find /var/spool/lp /etc/lp -print | cpio -ocv > /var/tmp/lp.cpio.save (in case something goes wrong)
ftp or rcp the lp.cpio file from the "perfect" host.
6) cpio icvdum < /var/tmp/lp.cpio
7) lpsched
Now everythinmg should be replicated including the default printer. You do need to make sure that host names for printer resolve equally well on all hosts but if you are using DNS, NIS, NIS+ or LDAP to resolve hostnames this shouldn't be a problem otherwise you will need to make sure that all the printers are defined in /etc/hosts on each box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:45 AM
10-21-2004 04:45 AM
Re: Import/Export printers from a server to another one...
Use procedure listed above
--------------
/usr/sam/lbin/lpmgr -S -v -xsavedir=/var/sam/lp/
cp -r -p /var/sam/lp/lp.new/* /var/sam/lp/
tar up /var/sam/lp/ and ftp to remote server.
On remotes, un tar the tarball, then:
lpshut
/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp/
lpsched -v
--------------
then do the following:
#lpshut
#cd /opt/hpnpl/bin
# ./transferqueue local
#lpsched
This will shut down printing
and run a utility script that will convert your queues to the the new product.
Make sure you turn printing back on.