[HPADM] RE: -[SUMMARY]-Moving Printers from one system to another

From: Naylor, Jim (Jnaylor_at_Schnucks.com)
Date: 06/17/04

  • Next message: BAKHSHESH Kazem: "[HPADM] sendmail"
    To: "Hpux-Admin@Dutchworks. Nl (E-mail)" <hpux-admin@dutchworks.nl>
    Date: Thu, 17 Jun 2004 09:55:58 -0500
    
    

    Thank to all that replied. Original question at the end of this email. All
    good suggestions and I tried every one of them. Unfortunately none of them
    worked. Kevin Hutcheson and Rick Starr suggested that the versions of
    /opt/hpnpl should be the same. The versions of /opt/hpnpl (Jetadmin) are
    not even close to being the same. Both systems are HP-UX 11.00 but the
    versions of /opt/hpnpl are way off. I tried Kevin Hutcheson suggestion to
    copy /opt/hpnpl from the old box to the new but that did not work either. I
    ended up creating each printer on the new system. All suggestions are
    listed below. As a test after I created the printer I used Tyrone's'
    suggestion:

    /usr/sam/lbin/lpmgr -S -xsavedir=/tmp/lp

    Then I used a the script provided by Bill Hassell to delete the printers on
    the new box. Then I used:

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

    to restore the printers on the new box again and this all worked fine. So
    in summary I believe the JetAdmin versions must be the same. Once again
    thanks to all.

    Kevin Hutcheson:
    Make sure /opt/hpnpl is also copied to the new server.

    When complete, you should be good to go.
    To Verify:
    lpstat -a
    lpstat -t
    Select a printer, and send a test print.

    Rick Starr:
    I have done that same procedure 1000times. For some reason once in a while I
    get a corrupt pstatus and/or qstatus binary file. But, Generally I make sure
    the spooler is down on the source and target, re-run the printer clone
    procedure and everything works fine. Is version of hpnp* the same on target
    and source?

    Bill Hassel:
    The JetDirect software is not good at handling large quatities
    of printers. The /etc/hosts issue may be an artifact, and not
    needed to add a printer. I have not seen the SAM save/restore
    printer stuff work well with JetDirect printers. For dozens to
    thousands of JetDirect printers, just do this:
     
    --On the original system, create an addqueue script:

    cd /etc/lp/interface
    grep ^PERIPH= * \
    | tr "=" " " \
    | tr ":" " " \
    | cut -d" " -f1,3 \
    | awk '{print "/opt/hpnpl//bin/addqueue -q ",$1 " -h ",$2 }' \
    > /tmp/addqueuescript

    --ftp this script over to your new system.
    --delete all the printers on the new system. Test the syntax with
    this:
     
    lpstat -v|tr -d ":" | awk '{print "/usr/sbin/lpadmin -x",$3}'
     
    and if looks OK, put the word eval in front: and save to a temp
    file:
     
    lpstat -v|tr -d ":" | awk '{print "eval \"/usr/sbin/lpadmin -
    x",$3}'\" > /tmp/delprinters
     
    --Then run the /tmp/delprinters, check with lpstat -v

    --Now run the /tmp/addqueuscript. This will add all the printers
    that are turned on and connected to the network. If a printer is
    dead, addqueue will timeout. Add these few by hand using addqueue
    once the printer is online again.

    Tyrone Muscat:
    This is how I copy printers:

    Source Machine:
    /usr/sam/lbin/lpmgr -S -xsavedir=/admintools/scripts/lp

    Destination Machine:
    /usr/sam/lbin/lpmgr -R -xsavedir=/admintools/scripts/lp
    /usr/sbin/lpsched

    I set this up to run in cron each night to make sure all my machines have
    the same printers defined. One of the benifits I setup the printer on the
    source machine and each night it gets copied over to all my destination
    machines.

    Thanks,
    Jim Naylor
    Unix Systems Administrator
    Schnuck Markets, Inc.
    * Direct: (314) 994-4784
    *)) Cell: (314) 691-0186
    * Fax : (314) 994-4684
    * jnaylor@schnucks.com

    -----Original Message-----
    From: Naylor, Jim
    Sent: Wednesday, June 16, 2004 9:57 AM
    To: Hpux-Admin@Dutchworks. Nl (E-mail)
    Subject: [HPADM] Moving Printers from one system to another

    Hello All,
    This is the procedure I did to copy all of my network printers to a new
    system but I cannot seem to get any print jobs to print on the new system.

    1- Stopped the spooler on the target system using lpshut
    2- On the Source System I did
    sam
          Peripheral Devices
             Printers and Plotters
                 LP Spooler
                    Save/Restore Spooler Configuration
                       Actions
                           Save Spooler Configuration
    3- cd /var/sam
             tar -cvf - lp | remsh Target_System "(cd /var/sam; tar -xvf -)
    4- On the Target system I did
    sam
       Peripheral Devices
          Printers and Plotters
             LP Spooler
                Save/Restore Spooler Configuration
                   Actions
                      Restore Spooler Configuration=
    5- On the target system I started the spooler using lpsched
    All of the printers show up on the target systems and show they are enabled
    and accepting request but when I do:
    lp -d syspr /tmp/aaa
    It queues the print job but never prints. I waited for 15 mins and it was
    still in the queue. I had to cancel the print job. I went into sam again
    and went to Printers and Plotters then did action/add a network
    printer/jetdirect and selected option 3 for diagnostics. I then selected
    option 3 to test network printer accessibility and it failed saying that my
    printer and ip address must be in the /etc/host file or in DNS. These
    entries are not in /etc/hosts on the source systems nor are they in DNS and
    the work just fine on the source system. I went ahead and added them into
    the /etc/hosts on the target systems and the diagnostic passed and the test
    print in the diagnostics passed but from the command line it just hangs in
    the queue. I deleted one printer and re-added it and it prints fine now.
    Any suggestions so I do not have to delete and re-add all of these printers.

    Thanks,
    Jim Naylor
    Unix Systems Administrator
    Schnuck Markets, Inc.
    * Direct: (314) 994-4784
    *)) Cell: (314) 691-0186
    * Fax : (314) 994-4684
    * jnaylor@schnucks.com

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact
    majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner:
    owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse
    only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse &
    search)
    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: BAKHSHESH Kazem: "[HPADM] sendmail"

    Relevant Pages

    • Printer Problems in AIX 4.3.3
      ... I'm having printer problems after attempting to copy a large amount of ... queue configurations from one system to another. ... Removed /etc/qconfig.bin on the target system ... All the printers are now listed on the target system with the correct ...
      (comp.unix.aix)
    • Re: Printer Problems in AIX 4.3.3
      ... > I'm having printer problems after attempting to copy a large amount of ... > queue configurations from one system to another. ... Restarted qdaemon on the target system ... > printers on the target the queue immediately goes down. ...
      (comp.unix.aix)
    • [HPADM] Moving Printers from one system to another
      ... This is the procedure I did to copy all of my network printers to a new ... 1- Stopped the spooler on the target system using lpshut ... All of the printers show up on the target systems and show they are enabled ... It queues the print job but never prints. ...
      (HP-UX-Admin)
    • RE: Launching a New user
      ... If the new account cannot use network printers when first logon SBS ... Microsoft CSS Online Newsgroup Support ...
      (microsoft.public.windows.server.sbs)
    • Re: IP port printers on 2003 server address change
      ... On one host we are running 3 network and one serial i/f Epson TM-U220. ... The problem only arises on the network printers hosted together with 2 other ...
      (microsoft.public.windows.server.networking)