Overview of Catalog Archiving process
Modification:
The following is an overview of the catalog archiving process. Catalog archiving is meant to be used to save disk space used by images with infinite or multi-year retention periods. It can be used for any image that will most likely not be restored, but must remain in the image catalog. It should not be used as a method to reclaim disk space when a catalog filesystem fills up. For those cases, investigate catalog compression or adding disk space and growing the filesystem.
Warning: Catalog archiving modifies existing catalog images. As a result, it should never be run when the catalog filesystem is 100% full. Entries are added to the header files in /usr/openv/netbackup/db/images. If the filesystem is at 100%, it is impossible to predict what would happen.
Note: There is no simple method to determine what tape the catalog has been archived to. The bpcatlist -offline command is the only administrative command to determine what images have been archived. This command does not list what tape was used for the archive. As a result, caution should be exercised to ensure the tapes used for catalog archiving are available for restoring the archived catalog images. Either create a seperate volume pool to use exclusively for catalog archives or find a method to label the tape as a catalog archive tape.
Step 1: Use bpcatlist to determine what image files will be archived.
Before attempting to run bpcatarc or bpcatrm use the bpcatlist command to display what images are available for archiving. Running bpcatlist alone will not modify any catalog images. Only when the bpcatlist output is piped to bpcatarc and bpcatrm will the images be modified and the image .f files removed.
To determine what images are available for catalog archiving, run the following command:
# /usr/openv/netbackup/bin/admincmd/bpcatlist -online
To determine what images have been previously archived run the following command:
# /usr/openv/netbackup/bin/admincmd/bpcatlist -offline
Note: This should return "no entity was found" if catalog archiving has not been previously run. For more information on what the fields in the bpcatlist output indicate, refer TechNote 273999.
To display all images for a specific client prior to January 1st, 2000 run the command:
# bpcatlist -client
To display the help for the bpcatlist command run the command:
# bpcatlist -help
Once the bpcatlist output correctly lists all the images that are to be archived, then the archive itself can be run.
Step 2: Running the catalog archive.
Before running the catalog archive, create a catarc schedule. This is required in order for the bpcatarc command to successfully process images. Refer to the 5.x System Administrator's Guide or TechNote 274028 for more details on creating a catarc policy. When initiated, the catalog archive will create a Job ID for each time the catalog archiving is run.
To run the catalog archive, run the bpcatlist command with the same options used in step 1 to display images. Then just pipe the output through bpcatarc and bpcatrm.
Eg. # bpcatlist -client all -before Jan 1 2000 | bpcatarc | bpcatrm
A Job ID will appear in the activity monitor. The command will wait until the backup completes before returning the prompt. It will report an error only if the catalog archive fails. Otherwise the commands will simply return to the prompt. The File List: section of the Job Details in the Activity Monitor will show a list of image files that have been processed. When the job completes with a status 0, the bpcatrm will remove the corresponding .f files. If the job fails, then no catalog .f files will be removed.
Step 3: Restoring the Catalog archive
To restore the catalog archive, you must first use the bpcatlist command to list the files that need to be restored. Once bpcatlist displays the proper files to restore, then the bpcatres can be run to restore the actual files.
To restore all the archived files from Step 2 above, run the command:
# bpcatlist -client all -before Jan 1 2000 | bpcatres
This will restore all the catalog archive files prior to Jan 1, 2000.
Some miscellaneous notes about catalog archiving:
In the /usr/openv/netbackup/db/images/
The header file will be named: catarc_
The files file will be named: catarc_
Do not attempt to archive the catarc_ image files. These are not archived by default. Attempting to archive catalog archives will make it nearly impossible to determine what files are needed for restoring catalog entries. The catarc_ image files contain a listing of what catalog images were archived and need to be present and intact on the master in order to do a catalog restore.
The catalog archive images will also appear in the Backup, Archive and Restore GUI. The catarc policy is of type Standard so it will display the catalog archive backups along with the regular filesystem backups. However, this is not the correct method to restore archived files. Catalog archive files should be restored using the bpcatlist
Running bpcatlist | bpcatarc |bpcatrm as listed on page 229 of the NetBackup 5.0 System Administrator's Guide 1 will archive the entire NetBackup catalog. To recover from this, run bpcatlist |bpcatres to restore all archived images. Then work with the bpcatlist command to determine what options are needed to archive only the desired images.
Some recommendations for catalog archiving:
Perform catalog archiving operations when NetBackup is in a quiet state. It is unknown what would happen to an active backup if bpcatlist | bpcatarc | bpcatrm was running during an active backup.
To ensure that catalog backup images are not on the same tapes as user backups, create a separate media pool for catalog archives.
You may find it useful to set up, then designate, a special retention level for catalog archive images. To specify retention levels, go to Host Properties | Master Server | Retention Periods or see "Retention Periods Properties" on page 369 of the NetBackup 5.0 System Administrator's Guide 1.
No comments:
Post a Comment