• No results found

Chapter 5: B ACKING UP D ATA

5.6 Advanced Backup Options

This sections describes how to configure the advanced options for a backup job. The information in this section is organized into the following topics:

„ Configuring Retention Policy for a Backup „ Using Pre and Post Backup Scripts

„ Setting up Custom Notification Events for a Job „ Verifying a Backup

Figure 5-2:

The Backup Advanced Options tab for configuring the retention period and other options

5.6.1 Configuring Retention Policy for a Backup

The retention policy for a backup defines how long the information about the saveset is kept in the NVDB. The retention policy can be time-based or generation-based.

„ Time-based Backup Retention – In a time-based retention policy, you specify the number of days, months or years you want to retain a backup. The time-based retention policy can be set for all backup types - full, incremental and differential.

„ Generation-based Backup Retention – In a generation-based retention policy, you specify the number of full backups for the same set of data you want to retain. This method can only be used for full backup type.

When the retention period elapses, NetVault: Backup retires the saveset and deletes information about the saveset from the NVDB. The information about the savesets for incremental/differential backups is automatically discarded when the base full backup retires.

To configure the retention period for a saveset, perform the following steps: 1. In the Backup window, click the Advanced Options tab.

2. To set generation-based retention period, perform the following: a. Under Backup Life, select Discard After (x Full Backups).

b. In the box, enter the retention period in number of days, weeks or years. Do not use this method for incremental and differential backup types. 3. To set time-based retention period, perform the following:

a. Under Backup Life, select Discard After (x Days/Weeks/Years). b. In the box, enter the retention period in number of days, weeks or years. c. Select Days, Weeks or Years option next to the box.

Note: To set or change the retention period for an existing saveset, refer to

Retiring Backup Savesetson page 133.

5.6.2 Using Pre and Post Backup Scripts

NetVault: Backup allows you to run your own scripts at the start and/or completion of a backup job. These scripts can be used to perform tasks, such as dismounting or shutting down a database before starting the job, or mounting/starting the database after the job completes. Consider the following points when using pre and post backup scripts:

„ The script must be an executable file, for example, .bat on Windows, or .sh on Linux/UNIX.

„ The scripts can contain run-time parameters. Use the NetVault: Backup environment variable NV_USER_ARG to access the values for these parameters in the script.

„ You can also use other NetVault: Backup environment variables in the script. For a list of available environment variables, refer to

NetVault: Backup Environment Variableson page 283.

„ After creating the script, copy it to the …\netvault\scripts folder on the target Client. You can also create sub-folders to organize the scripts.

„ By default, NetVault: Backup provides the following two scripts that can be run as post backup scripts:

™ psmail – This script emails the job completion status to the addresses passed as user parameter.

™ psmail_logs – This script emails the job completion status and the job logs to the addresses passed as user parameter.

„ If a pre script fails, the backup job fails.

„ If the pre script completes successfully while the backup job fails, the post script is still executed; the job status is reported as Backup Failed.

„ If the pre script and the backup complete successfully while the post script fails, a script error is logged; the job status is reported as completed with warnings.

To run pre and post scripts for a backup job, perform the following steps: 1. In the Backup window, click the Advanced Options tab.

2. Under Pre and Post Scripts, select the following options: a. To run a script before the job starts, select Use Pre Script. b. To run a script after the job completes, select Use Post Script. 3. Enter the script file name in the box next to the selected check box. If the

script resides in the …\netvault\scripts folder, just enter the file name. Whereas, if it resides in a sub-folder within the …\netvault\scripts folder, enter the relative path (e.g., if the script file myscript.bat resides in the folder ...\netvault\scripts\tst, enter \tst\myscript.bat in the box).

4. To pass run-time parameters, enter the value in the User Parameter box. The value must be valid and conform to its usage in the script. NetVault: Backup does not perform any validity checks on the user parameter.

5.6.3 Setting up Custom Notification Events for a Job

An event is an action or a condition that indicates an error, a problem or change in the component status. NetVault: Backup provides a set of pre-defined events for which you can set up a notification method to alert you when they occur and/or take a remedial action. For details on event types and notification methods, refer to Setting up Event Notificationon page 151. In addition to the default events, NetVault: Backup supports the following custom events for a backup job:

„ Backup completes successfully

„ Backup completes with warnings

„ Backup fails

The custom events defined for a job are added to the Jobs – User Defined event category in the Global Notification window, and can be raised for any backup job within the domain.

To set up a custom notification event for a backup job, perform the following steps: 1. In the Backup window, click the Advanced Options tab.

a. To raise an event when the job completes successfully, select the Raise Event if Job is Successful check box.

b. To raise an event when the job completes with warnings, select the Raise Event if Job has Warnings check box.

c. To raise an event when the job fails, select the Raise Event if Job Fails check box.

3. In the list next to the selected check box, select the custom event. If no custom events are defined, the list will be empty. To define a new event, enter the event name in the box.

4. For a new custom event, perform the following steps:

a. Click Save on toolbar. Alternatively, on the File menu, click Save. b. Set up the notification method(s) for the event. For details on setting up

global notification methods, refer to Setting up a Global Notification Methodon page 153. For details on setting up user-specific notification methods, refer to Setting a Notification Profile for a Useron page 165. c. Load the job again and complete the remaining job definition steps.

5.6.4 Verifying a Backup

Backup verification essentially involves verifying the stream length written to the media and ascertaining no blocks were dropped. While the actual backup runs as phase 1, the backup verification runs as phase 2 of the backup job. By default, the verification phase runs on the NetVault: Backup Server. To run the verification phase locally or to configure another default Client, refer to the NetVault: Backup Configurator Guide. An error is logged if any dropped blocks are detected and the verification fails. You must run the job again if the backup verification fails. To run the verification phase for a backup job, perform the following steps.

1. In the Backup window, click the Advanced Options tab. 2. Under Verification, select the Verify After Backup check box.

5.6.5 Enabling Network Compression for a Backup

While transferring data over the network, you can compress the data to reduce the bandwidth usage. The data is first compressed on the target Client before it is transferred over the network. On the Client to which the target device is attached, the data is de-compressed before it is written to the media. To enable network compression for a backup job, perform the following steps:

1. In the Backup window, click the Advanced Options tab.