z/OS Infoprint Server Printer Inventory for PSF
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Backing up the Printer Inventory to a UNIX file

z/OS Infoprint Server Printer Inventory for PSF
SA38-0694-00

Backing up the Printer Inventory to a UNIX file

You can back up the Printer Inventory to a UNIX file. This section shows how to back up the Printer Inventory at 3 AM each day to file:

/var/Printsrv.backups/inventory.backup.yymmdd

The date of the backup is yymmdd.

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:

  • Create a separate file system mounted at /var/Printsrv.backups. Do not back up the Printer Inventory to files in the /var/Printsrv file system because the backup files can be large.
  • 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 UNIX file:

  1. 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
    export extension=$(date "+%y%m%d")
    pidu -c "export /var/Printsrv.backups/inventory.backup.$extension;"

    Otherwise, put the following lines in the file to export the environment 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
    export extension=$(date "+%y%m%d")
    pidu -c "export /var/Printsrv.backups/inventory.backup.$extension;"

    To automatically delete all files in the /var/Printsrv.backups directory that were created more than five days ago, add this command to the shell script:

    rm $(find /var/Printsrv.backups -ctime "+5")

    Tip: When the cron daemon runs the commands in your crontab entry, it does not first run your .profile to establish environment variables.

    _______________________________________________________

  2. Set the execute permission bit for the /u/userid/do.backup shell script. For example:
    chmod +x /u/userid/do.backup

    _______________________________________________________

  3. Use the crontab command with the -e option to insert this line into the crontab entry:
    00 03 * * * /u/userid/do.backup

    _______________________________________________________

Related information:

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014