From: Willeat, Todd (TWilleat@MHP.SMHS.COM)
Date: Thu Nov 14 2002 - 17:39:50 EST
Here's a script I use to move printer queues.
#!/bin/ksh
# Makes archive of necessary files and directories to copy printers to new
box
# Version History:
# Version 1.0 (09/17/2002) - Initial Version
TARFILE="/tmp/migrateprinters.tar"
PROGNAME=$(basename $0)
case $1 in
'source')
# Add files
echo "Generating archive ($TARFILE)... \c"
tar cf $TARFILE /etc/qconfig
/var/spool/lpd/pio/@local/custom /var/spool/lpd/pio/@local/ddi
/var/spool/lpd/pio/@local/dev
echo "Done.\n\nThe file '$TARFILE' must now be transferred
to the target \nsystem's /tmp directory. Then extract the files by executing
\n'$PROGNAME target' on the target system."
;;
'target')
# Extract files
tar xf $TARFILE
# Refresh smit panels
cp
/usr/lpp/printers.rte/inst_root/var/spool/lpd/pio/@local/smit/*
/var/spool/lpd/pio/@local/smit
# Redigest queues
cd /var/spool/lpd/pio/@local/custom
for COLONFILE in $(ls)
do
/usr/lib/lpd/pio/etc/piodigest $COLONFILE
done
# Cycle printer subsystem
stopsrc -cg spooler
startsrc -g spooler
;;
*)echo "Usage: $PROGNAME {source|target}"
;;
esac
-----Original Message-----
From: pSeries AIX Geek [mailto:aixgeek@YAHOO.COM]
Sent: Thursday, November 14, 2002 4:04 PM
To: aix-l@Princeton.EDU
Subject: Copying printer queues
I have something like 700 printer queues to move from
one system to another. I know that other than
/etc/qconfig, there's a whole directory structure
under /var that I can tar up and move (but I can't
remember it).
What is that directory structure? Or am I off my
rocker?
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:20 EDT