DOCUMENTATION: Overview of Catalog Archiving process


DOCUMENTATION: Overview of Catalog Archiving process


The following is an overview of the catalog archiving process. Catalog archiving is meant to be used to reclaim disk space used by the files file of images that backed up many thousands of files and that also have infinite or multi-year retention periods.  This allows the large files files for these images to be removed from disk while the image header files 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 either the header files in /usr/openv/netbackup/db/images (pre-NB 7.5) or into the image records in the Sybase NBDB (post-NB 7.5).  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 will the files files be backed up, and only when the output is piped to bpcatrm will the the files files be deleted from disk.

To determine what images have files files on disk that can be archived, run the following command.  The catarcid column will indicate whether the files file is not currently backed up (0) or the catarcid of the backup of that image.

# /usr/openv/netbackup/bin/admincmd/bpcatlist -online

To determine what images have been previously archived and removed from disk, 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 to TECH36412 in the Related Articles section.

To display all images for a specific client prior to January 1st, 2000 run this command.

# bpcatlist -client <name> -before Jan 1 2000

To display the help for the bpcatlist command run this command.

# bpcatlist -help

Once the bpcatlist output correctly lists all the images that are to be archived or deleted, then those commands can be added.

Step 2: Running the catalog archive.

Before running the catalog archive, create a catarc policy. This is required in order for the bpcatarc command to successfully process images. Refer to TECH36434 in the Related Articles section for more details on creating a catarc policy.  

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 typically bpcatrm.

# bpcatlist -client all -before Jan 1 2000 | bpcatarc | bpcatrm

A new job 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.

If bpcatlist is piped to bpcatarc but the results is not piped to bpcatrm, then the backup will occur but the files files will not be removed from disk.  The same bpcatlist command can then be rerun and piped to bpcatrm to remove the files files.

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/<master>/<date_dir> directory, a header and files file will be created for the catalog archive job.  
The header file will be named: catarc_<time>_UBAK
The files file will be named: catarc_<time>_UBAK.f

Do not attempt to archive the catarc_<time>_UBAK 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_<time>_UBAK 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.

Note: Starting with NetBackup 7.5 the image header files are stored in the Sybase NBDB and are no longer present on disk.  Because the files files can be very large, they still exist on disk unless archived.

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 <options> | bpcatres commands.

Warning: Running bpcatlist | bpcatarc | bpcatrm without any options 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 only on images that are not currently be operated upon by other NetBackup operations such as duplications, vaulting, or Storage LifeCycle Policies.  Use appropriate options on the bpcatlist command to select only appropriate images..

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.



Terms of use for this information are found in Legal Notices.



Did this article answer your question or resolve your issue?


Did this article save you the trouble of contacting technical support?


How can we make this article more helpful?

Email Address (Optional)