Storage Lifecycle Policies

SLPs are the favoured method of managing data within your NetBackup environment if you have to deal with multiple copies of the same image. The most common SLP operations are duplication and replication  and whilst SLPs cannot eject cartridges from a tape library, the data management aspect of SLPs offer a big enhancement over other methods such as Vault.

Unless the SLP is an inport SLP, it is important to remember that the first operation of a SLP needs to be a backup operation. If the first operation is a backup operation, when a SLP is deactivated the backup operation remains active but additional operations are suspended.

To view a detailed list of all SLPs within the system

# /usr/openv/netbackup/bin/admincmd/nbstl -L

The following command will list all images been processed via a SLP and are still retained within the catalog. Those images which have a status of 3 have completed their SLP processing, a value of 1 or 2 means the processing has either not started or is in progress respectively. The output of this command can run to many lines.

# /usr/openv/netbackup/bin/admincmd/nbstlutil stlilist -L

To create a simple SLP which will take a backup and duplicate the image with differing retention periods for both copies

# nbstl SLP_DUPLICATION -add -uf 0,1 -residence STU1,STU2 -source 0,1 -rl 1,2

In the command above the values for both operation 1 and operation 2 of the SLP must be given in the same command with the values separated by commas. In this example the options are as follws :

-uf 0,1 : confirms that the first operation is a backup (0) and the second is a duplication (1)

-residence STU1,STU2 : confirms that the backup target for the first operation is STU1 and the target for the second operation is STU2

-source 0,1 : confirms that the second operation is dependent on the first operation which is a backup

-rl 1,2 : confirms that the retention level for the first image is 1 and for the second image is 2

The SLP values can be modified after the SLP has been created. Care must be taken though as the version number of the SLP will change and this may lead to confusion as some SLP images could which were in flight before the change will be handled differently to the images which are processed after any attributes are modified.

To modify a SLP's settings the modify switch must be used with the nbstl command

To modify the retention level of the images in the SLP_DUPLICATION SLP

# nbstl SLP_DUPLICATION -modify -rl 2,3

The following command will create a replication SLP which is required for AIR, Automatic Image Replication

# nbstl SLP_REPLICATION -add -uf 0,3 -residence STU1,__NA__ -source 0,1 -rl 1,5

As with the duplication SLP, the values for both operation 1 and operation 2 of the SLP must be given in the same command with the values separated by commas. In this example the options are as follws :

-uf 0,3 : confirms that the first operation is a backup (0) and the second is a replication (3)

-residence STU1,__NA__ : confirms that the backup target for the first operation is STU1. The remote storage target is not specified in the replication SLP but in the import SLP on the target master server. The target master server was identified when the trust relationship was setup

-source 0,1 : confirms that the second operation is dependent on the first operation which is a backup

-rl 1,5 : confirms that the retention level for the first image is 1 and for the second image is 5

On the target master server an import SLP must be configured with the same name as the replication SLP on the source master server

To modify the retention level of the images in the SLP_DUPLICATION SLP

# nbstl SLP_REPLICATION -add -uf 4 -managed 3 -residence STU_IMPORT -wcopt SFN

The values for the above import operation are

-uf 4 : Confirms this is an import operation (4)

-managed 3 : Confirms the retention period for the imprt image will be taken from the source SLP

-residence STU_IMPORT : The imported image will be written to the STU_IMPORT STU

-wcopt SFN : SLP processing will continue even if a defined SLP window has shut

If required, a duplication operation can be added to the import SLP so the imported image also gets duplicated at the target site

# nbstl SLP_REPLICATION -modify -uf 4,1 -managed 3,0 -residence STU_IMPORT,STU_DUPLICATION -source 0,1

The values for the above import operation are

-uf 4,1 : The first operation is an import operation (4) and the second operation is a duplication (1)

-managed 3,0 : The retention period for the imprt image will be taken from the source SLP and the duplication image will have the same retention period

-residence STU_IMPORT, STU_DUPLICATION : The imported image will be written to the STU_IMPORT STU and the duplication image will be written to the STU_DUPLICATION STU

-source 0,1 : The second operation is dependent on the first option

It is possible to view images waiting to be imported onto a target master server

# nbstlutil pendimplist

To view the status of completed AIR images

# nbstlutil repllist

To view the detailed status of a backup image and its SLP processing history

# nbstlutil list -backupid <backup_id> -L

To cancel an operation on an image which is still being processed by an SLP

# nbstlutil cancel -backupid <backup_id>

To retry a cancelled operation

# nbstlutil redo -backupid <backup_id> -slpindex 2

In the above command the slpindex is the operation which is to be retried within the SLP. Each operation will have an index, operation 1 will be index 1, operations 2 will be index 2 etc

The following command will manually replicate the primary copy of a backupid to the remote master. For this command to work the source copy must have been written by a SLP which had a replication operation defined. This command could be used in circumstances were the originally replicated copy was lost.

# nbreplicate -backupid <backup_id> -cn 1 -rcn 102 -slp_name REPLICATION_SLP

The above values are

-cn 1 : copy number 1 will be replicated

-rcn 2 : The remote copy number will be SLP operation index number plus 100

-slp_name : The name of the SLP which originally replicated the image