How to handle backup image copies with a retention level of "INFINITY - 1" (2147483646)

How to handle backup image copies with a retention level of "INFINITY - 1" (2147483646)

Article: 100048744
Last Published: 2021-01-06
Ratings: 1 0
Product(s): Appliances, NetBackup

Problem

The maximum retention period allowed by NetBackup 8.x, and prior versions, is the year 2038.  If customers created a custom retention period to save backup images for longer than the year 2038, NetBackup sets the retention of such images to the value of "INFINITY – 1". But due to the limitation, these images will normally expire in 2038.

This article describes the manual steps to be performed to update the retention for such images after completion of the upgrade to NetBackup 9.0, which allows retention periods that extend beyond 2038.

Note: Backup images with a retention period of INFINITE are handled separately as discussed in the Related Articles.

Cause

This limitation was a result of the data structure associated with the backup image in NetBackup 8.x and prior versions.

To prevent the expiration of such backup images, they must be updated/fixed before the year 2038.
 

Solution

Below are the steps to detect whether there are image copies with an expiration value of "INFINITY - 1" (2147483646) post upgrading to NetBackup 9.0.

Option 1: Manually identifying the images using the bpimagelist command.  Any such records can then be updated using the "bpexpdate -recalculate" command. 

Depending on the number of such images, finding and updating them may take a significant amount of time. 


Option 2

1. Set 'DBM_RUN_INFINITY_CHECK = 1' in the NetBackup configuration on the master server.

Windows:
cd <install_path>\NetBackup\bin\admincmd
echo  DBM_RUN_INFINITY_CHECK=1 | bpsetconfig

Linux/Unix:
echo  DBM_RUN_INFINITY_CHECK=1 | /usr/openv/netbackup/bin/admincmd/bpsetconfig


2. The next cleanup job will determine if are any records with expiration value of 2147483646. A message will be logged in the Activity Monitor Details and the cleanup job will complete with a status 1.

Alternatively, the cleanup job can be manually started using the below command

bpimage -cleanup -allclients


Sample job details, where we see the image cleanup completes with status 1

Dec 21, 2020 4:30:58 AM - Info bpdbm (pid=24000) image catalog cleanup
Dec 21, 2020 4:30:58 AM - Info bpdbm (pid=24000) Cleaning up tables in the relational database
.
Dec 21, 2020 4:31:01 AM - Warning bpdbm (pid=24000) Images exist with the special, deprecated, expiration time of 2147483646 or 2147483647. This expiration time indicates that the desired expiration was greater than we could record prior to NetBackup 9.0. Please consider recalculating expiration for these images to more accurately schedule their retention.
Dec 21, 2020 4:31:01 AM - Info bpdbm (pid=24000) deleted 0 expired records, compressed 0, tir removed 0, deleted 0 expired copies
The requested operation was partially successful.  (1)


Attached is a Perl script, for use on the NetBackup 9.0 master server, that can be used to find and update such records.

  • It locates each image copy with expiration value currently set to INFINITY -1.
  • Checks the current retention level, which might have been changed since copy creation.
  • Reapplies the retention level if it would result in an expiration time that is greater than the current expiration value. I.e. those that are beyond the year 2038.

Once downloaded, remove the .txt extension from the file and use Perl to run it. Please ensure that you take a successful FULL catalog backup before executing the script. 

For Linux/Unix:
perl upgrade_infinity-minus-one.pl -v
(The -v option will ensure that it prints the output on screen and can be used to monitor the progress of the script)

For Windows:

Perl on Windows is required to run the script on a Windows master server. 
In the below example, Strawberry Perl has been used and is available for download from https://strawberryperl.com/.


C:\>perl -v

This is perl 5, version 32, subversion 0 (v5.32.0) built for MSWin32-x64-multi-thread
Copyright 1987-2020, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.


C:\>perl C:\upgrade_infinity-minus-one.pl -v

Note:

For Windows, once the Perl script is downloaded, two fields at the start of the script need to be updated to point to the correct install path. 

Example: 
my $PATH = "C:\\Program Files\\Veritas\\NetBackup\\Bin\\admincmd\\";
my $EXT  = ".exe";

Was this content helpful?