Backing up the Printer Inventory to a GDG
You can back up the Printer Inventory to a generation data group
(GDG). This section shows how to back up the Printer Inventory at
3 AM each day.
Rule: Do not use copy commands to create
a backup copy of the Printer Inventory because the copy might contain
inconsistent data that makes the Printer Inventory unusable.
Before you begin: Make sure
that you are a member of the AOPADMIN group and have READ access to
the AOP.ADMINISTRATOR resource profile in the PRINTSRV class.
To back up the Printer Inventory to a GDG:
- Create a GDG. This sample JCL creates a GDG for which five generation
data sets are maintained:
//AOPGDG JOB MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG (NAME(hlq.INV.BACKUPS) NOEMPTY SCRATCH LIMIT(5))
/*
_______________________________________________________
- Use one of these methods to run the pidu export command
to back up the Printer Inventory to a new data set in GDG hlq.INV.BACKUPS:
- Run the pidu export command as a batch job:
//AOPBINV JOB MSGLEVEL=(1,1)
//STEP1 EXEC PGM=AOPBATCH,PARM='/pidu -c "export //DD:INVENT;"'
//INVENT DD DISP=(NEW,CATLG),DSN=hlq.INV.BACKUPS(+1),
// DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760),
// UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE)
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD *
NLSPATH=/usr/lpp/Printsrv/En_US/%N
AOPCONF=/etc/Printsrv/aopd.conf
/*
If Infoprint Server
files are located in the default locations, you can omit the STDENV
DD statement.
- Run the pidu export command
as a cron job:
- Create a file to contain a short shell script, such as /u/userid/do.backup. Your
login user ID is userid.
If you set the
PATH, NLSPATH, and optional AOPCONF environment variables with the
values required by Infoprint Server in /etc/profile or /u/userid/.profile, put
these lines in the file:
. /etc/profile
. /u/userid/.profile
pidu -c "export //\'hlq.INV.BACKUPS\(\+1\)\';"
Otherwise,
put the following lines in the file to export the variables. You can
omit the AOPCONF variable if the Infoprint Server configuration file is /etc/Printsrv/aopd.conf.
export PATH=/usr/lpp/Printsrv/bin:/bin:$PATH
export NLSPATH=/usr/lpp/Printsrv/%L/%N:/usr/lpp/Printsrv/En_US/%N:$NLSPATH
export AOPCONF=/etc/Printsrv/aopd.conf
pidu -c "export //\'hlq.INV.BACKUPS\(\+1\)\' ;"
Tip: When the cron daemon
runs the commands in your crontab entry, it
does not first run your .profile to establish
environment variables.
_______________________________________________________
- Set the execute permission bit for the /u/userid/do.backup shell script. For example:
chmod +x /u/userid/do.backup
_______________________________________________________
- Use the crontab command with the -e option to insert this line into the crontab entry
to back up the Printer Inventory at 3 AM each day.
00 03 * * * /u/userid/do.backup
_______________________________________________________
Related information:
|