The following procedure can be used to copy the printer configuration from one AIX system to another AIX system. This has been tested using different AIX levels, and has worked great. This is particularly useful if you have more than just a few printer queues configured, and configuring all printer queues manually would be too cumbersome.
- Create a full backup of your system, just in case something goes wrong.
- Run lssrc -g spooler and check if qdaemon is active. If not, start it with startsrc -s qdaemon.
- Copy /etc/qconfig from the source system to the target system.
- Copy /etc/hosts from the source system to the target system, but be careful to not lose important entries in /etc/hosts on the target system (e.g. the hostname and IP address of the target system should be in /etc/hosts).
- On the target system, refresh the qconfig file by running: enq -d
- On the target system, remove all files in /var/spool/lpd/pio/@local/custom, /var/spool/lpd/pio/@local/dev and /var/spool/lpd/pio/@local/ddi.
- Copy the contents of /var/spool/lpd/pio/@local/custom on the source system to the target system into the same folder.
- Copy the contents of /var/spool/lpd/pio/@local/dev on the source system to the target system into the same folder.
- Copy the contents of /var/spool/lpd/pio/@local/ddi on the source system to the target system into the same folder.
- Create the following script, called newq.sh, and run it:
#!/bin/ksh let counter=0 cp /usr/lpp/printers.rte/inst_root/var/spool/lpd/pio/@local/smit/* \ /var/spool/lpd/pio/@local/smit cd /var/spool/lpd/pio/@local/custom chmod 775 /var/spool/lpd/pio/@local/custom for FILE in `ls` ; do let counter="$counter+1" chmod 664 $FILE QNAME=`echo $FILE | cut -d':' -f1` DEVICE=`echo $FILE | cut -d':' -f2` echo $counter : chvirprt -q $QNAME -d $DEVICE chvirprt -q $QNAME -d $DEVICE done
- Test and confirm printing is working.
- Remove file newq.sh.