My NDMP Notes from the symantec admin guide.
NetBackup for NDMP is an
optional application that enables NetBackup to use the Network Data Management
Protocol (NDMP) to initialize and control backups and restores of Network
Attached Storage (NAS) systems
Types of NDMP Backup
The NDMP server application
on the NDMP host performs backups and restores of the NDMP host, directed by
commands received from an NDMP client (NetBackup). Backups can be conducted in
any of the following ways:
•
NDMP local backup
•
NDMP three-way backup
•
Backup to a Media Manager
device on the NetBackup server
High
speed local backup of NDMP hosts
Backup
data travels between disk and tape drives that are directly attached to the
same NDMP host. This provides high-speed backup without impairing network
throughput.
Three-Way Backup/Restore
In a three-way backup or restore, data travels between an NDMP
host and a storage device attached to another NDMP host or to a NetBackup media
server. This contrasts with local NDMP backup/restore, where the data travels
between an NDMP host’s disk and a storage device directly attached to the same
NDMP host.
Backup to a Media Manager device on the
NetBackup server
(Remote NDMP)
Backup
of a network-attached NDMP host to a tape device on a NetBackup media server.
This is a form of three-way backup also known as remote NDMP. This feature
supports NDMP versions V2, V3, and V4 on the NDMP hosts.
NDMP Storage Unit
An NDMP storage unit stores the backup data for an NDMP host. The
tape drives in this storage unit attach directly to the NDMP host or can be
configured on a SAN.
Note that NDMP storage units cannot be used to store data for non-NDMP
hosts, and NetBackup disk storage units cannot be used for NDMP tasks.
Storage Units
NetBackup uses either
NDMP-type storage units (for local or three-way backup), or Media Manager
storage units (for backup to devices attached to a NetBackup media server).
NDMP Storage Units
When backing up NDMP host
data to devices attached to an NDMP host or available to the NDMP host on a
SAN, NetBackup requires NDMP-type storage units.
An NDMP storage unit can
contain standalone or robotic drives. Robotic controls can be in a TLD (Tape
Library DLT), TL8 (Tape Library 8MM), TLH (Tape Library Half Inch), or ACS
robot type.
Media Manager Storage
Units
When backing up NDMP host
data to devices attached to a NetBackup for NDMP server or available to the
server on a SAN, you can use drives configured in Media Manager-type storage
units.
For NDMP backup, drives in Media Manager-type storage units do not
have to be dedicated to NDMP data: they can store backups of regular (non-NDMP)
NetBackup clients as well as of NDMP clients.
NDMP Backup Process
During a backup, the
following events occur:
1. From the EMM database, NetBackup obtains a
media ID for the tape that will be used for the backup and sends a tape-mount
request to ltid.
2. ltid on the NetBackup for NDMP server sends the
NDMP (SCSI robotic) commands necessary to get the requested tape mounted on the
storage device.
3. NetBackup sends the NDMP
commands necessary to have the NDMP server application perform a backup to the
tape. The backup data travels in one of two ways:
•
Between the local disk
and tape drives on an NDMP host.
•
Over the network, from an
NDMP host without its own storage device to a NDMP host (or NetBackup media
server) with a locally attached storage device (three-way backup).
•
4. The NDMP server
application sends information to the NetBackup for NDMP server about the files
that were backed up. This information is stored in the NetBackup file database.
•
5. The NDMP server
application sends status about the backup operation to the NetBackup for NDMP
server.
Direct Access Recovery
(DAR)
Quickly restoring a
single file or group of files from a backup image created by NetBackup for NDMP
can be accomplished automatically using Direct Access Recovery (DAR). DAR can
greatly reduce the time it takes to restore files. DAR is enabled by default
(no configuration required).
There are two
prerequisites for using DAR with NetBackup for NDMP:
•
DAR must be supported by
the NDMP host where the NDMP server application resides.
•
The backup must have been
made by NetBackup 4.5 GA or later, with the catalog in binary format (binary
format is the default).
Note File-level DAR is supported; directory-level
DAR is not supported.
DAR enables the NDMP host
to position the tape to the exact location of the requested file(s), reading
only the data needed for those files. NetBackup automatically determines
whether DAR will shorten the duration of the restore, and activates DAR only
when it will result in a faster restore.
NetBackup DAR can be
disabled for all NDMP policies
Enabling/Disabling DAR
By default, NetBackup for
NDMP is configured to use Direct Access Recovery (DAR). For each restore,
NetBackup automatically determines if the use of DAR will speed up the restore.
NetBackup uses DAR only when it will result in a faster restore.
Note NetBackup can use DAR only if the NDMP NAS
host supports it (contact your NAS vendor for details).
DAR can be turned off if
desired. This may be necessary if you are having problems with DAR and your
NDMP host is an older machine or is not running the latest NAS OS version.
1.
In the NetBackup
Administration Console, expand Host Properties and click on Master Servers or Media Servers.
2.
Right-click on the name
of the server and select Properties.
3.
Click on General Server.
4.
Uncheck the Use direct access recovery for NDMP restores box, and click Apply. This disables DAR on all NDMP restores.
Installing on UNIX
Servers
Note If you are installing in a cluster
environment, you must freeze the active node before you begin the installation
process so that migrations do not occur during installation. For information
about freezing a service group, see the clustering section in the NetBackup High Availability System
Administrator’s Guide for the cluster software you are running.
On the UNIX host that you
want to be the NetBackup for NDMP server, do the following:
1.
Log in as root.
2.
Install NetBackup server
and client software as explained in the NetBackup Installation Guide for UNIX.
3.
Make sure a valid license
key for NetBackup for NDMP has been registered by entering the following
command to list and add keys:
/usr/openv/netbackup/bin/admincmd/get_license_key
1.
Insert the CD-ROM
containing NetBackup for NDMP software in the drive.
2.
Change your working
directory to the CD-ROM directory:
cd /cd_rom_directory
Where cd_rom_directory is the path to the directory where you can access the
CD-ROM. On some platforms, it may be necessary to mount this
directory.
6. To install NetBackup for NDMP, execute the
following:
./install
Since other NetBackup products are included on the CD-ROM, a menu
appears.
7. Select NetBackup Add-On Product Software.
a. Select the NetBackup for NDMP option.
b. Enter q to quit the menu.
c. When asked if the list is correct, answer y.
1.
If this NetBackup for
NDMP server is not your master server, also install your NDMP license key on
the master.
2.
In a clustered
environment, the above steps must be done on each node in the cluster.
Uninstalling NetBackup
for NDMP
On the server where you
initially loaded the NetBackup for NDMP software, do the following. This
procedure results in total removal of the NetBackup for NDMP software.
Note In a cluster environment, you must first
freeze the active node so that migrations do not occur during installation. For
help freezing a service group, see the clustering section in the NetBackup High Availability System
Administrator’s Guide for the cluster software you are running.
1.
Check the Activity
Monitor in the Administration Console to make sure no NetBackup for NDMP
backups are active or running (State field reads Done).
2.
If ltid is running, stop
it (use the Activity Monitor > Daemons tab).
3.
Pre-6.0 NetBackup on
Solaris only: if ndmpmoveragent is running (check the Activity Monitor > Processes tab), stop it by entering the following:
cd /usr/openv/volmgr/bin
./ndmpmoveragent.stop
4. To remove the NetBackup for NDMP package,
enter the following: On Solaris:
pkgrm VRTSnbdmp
On other UNIX platforms:
rm -f
/usr/openv/lib/libndmp_bpfsmap.s?rm -f /usr/openv/lib/libndmpclient.s?rm -f
/usr/openv/volmgr/bin/set_ndmp_attrrm -f /usr/openv/share/version_ndmprm -f
/usr/openv/netbackup/bin/ndmpmoveragent
where ?is a wildcard.
5. Restart ltid.
Note If uninstalling in a cluster environment,
unfreeze the active node after the uninstall.
Authorizing Access to
the NDMP Host
Before NetBackup can
carry out backups, it must have access to the NDMP host. To authorize this
access, use the following dialog from the NetBackup Administration Console on
your NetBackup for NDMP master server. You can also use the NetBackup Device
Configuration wizard to create this authorization.
Note Do the following on the master server (not
media server) if you are going to create snapshots using the Advanced Client
NAS_Snapshot method.
▼ To authorize NetBackup access to the NDMP host (from
Administration Console)
1. On the NetBackup server: under Media and Device Management > Devices, click on NDMP Hosts. Under Actions, choose New > NDMP Host.
The NDMP host name dialog appears.
2. Enter the name of the NDMP server that
NetBackup will back up.
Note This NDMP host name is case-sensitive.
Whenever this host name is used (such as when configuring tape drives and
storage units for this host), the name must be identical to the name entered here.
3. Click OK.The New NDMP Host dialog appears.
The term credentials refers
to the username and password that NetBackup will use to access the NDMP host.
4. Specify the following:
Use gobal NDMP credentials for this
NDMP host
Select this option to enable all
NetBackup media servers under the master server to access this NDMP host using
a pre-defined global NDMP login. This login is created under Host Properties > Master Server > Properties >
NDMP, on the NDMP Global Credentials
dialog.
Use the following credentials for
this NDMP host on all media servers
Select this option to enable all
NetBackup media servers connected to the NDMP host to access the NDMP host
using the login you specify on this dialog:
◆ Username: the user name under which NetBackup will access the NDMP
server. This user must have permission to execute NDMP commands.
Chapter
3, Configuring NDMP Backup to NDMP-Attached Devices 25
◆ Password and Confirm Password: enter the password for this user. Use different credentials for this NDMP host
on each media server
Select this option to
specify NDMP logins for particular NetBackup servers, then click Advanced Configuration. The Advanced NDMP Credentials dialog
appears.
5. Click Add. The Add Credentials
dialog appears.
6.
Select a NetBackup server and specify
the username and password it will use to access the NDMP host.
7. Click OK. NetBackup validates the username and password. The
NetBackup server and username appear in the Advanced NDMP Credentials dialog.
8. If needed, click Add
again to specify other servers and
user names.
9.
Repeat this procedure for each NDMP
host that NetBackup will back up.
Access for Three-Way Backups and
NDMP to Media Manager
To perform three-way backups, you
must authorize access to the desired NDMP host as described in the previous
section.
•
Three-way backups: for the NDMP host name,
specify the NDMP host that has no attached tape drive.
•
NDMP to Media Manager backups: for
the NDMP host name, specify the NDMP host that will be backed up to the
media manager storage unit defined on the NetBackup server.
Media Manager Device Configuration
Adding a Robot Directly
Attached to an NDMP Host
Using the NetBackup Administration Console:
1. Start the NetBackup Administration Console on
the NetBackup for NDMP server as follows:
On Windows: from the Windows Start menu, select Programs, VERITAS NetBackup, NetBackup
Administration Console.
On UNIX, enter the following:
/usr/openv/netbackup/bin/jnbSA &
1.
Select Media and Device Management > Devices in the left pane.
2.
On the Actions menu, select New, then select Robot... from the popup. The Add Robot dialog appears.
3.
On the Actions menu,
select New, then select Robot... from the popup. The Add Robot dialog appears.
4.
For Media Manager host,
specify the host that manages the EMM database (by default, this is the
NetBackup master server).
5.
For Device host, use
the pull-down to select the NetBackup media server.
6.
Specify Robot type and number as
explained in the NetBackup Media Manager System
Administrator’s Guide.
7.
Under Robot control,
click Robot control is attached to an NDMP
host.
8. For Robot device path, enter the device name of the robot. There is no need to include
the NDMP host name as part of the device path.
9. For NDMP host name, enter the name of the NDMP host to which the robot is attached.
10. Specify the Bus, Target, and LUN values if they are required by the NDMP host.
By default, the bus, target and lun values are 0.
11. Click OK.
A popup message asks if
you want to stop and restart the device manager service (or daemon). Click Yes.
Adding a Drive
Using the NetBackup Administration Console:
1.
Select Media and Device Management > Devices in the left pane.
2.
On the Actions menu,
select New, then select New Drive (on UNIX, Tape Drive) from the popup. The Add Drive dialog appears.
For Drive
Name: Enter the name of the drive.
For Host and path information:
- Click Add
to specify a drive path.
b. For Device host, select the name of the NetBackup media server. Use the pull-down
to select media servers already defined, or click Add to enter a new one.
c. For Path (called No rewind device on UNIX), enter the device file name of the
tape drive, such as nrst2a. Refer to the NAS vendor documentation for your
drive for the correct format of the device file name.
As an alternative, you can use the following
command to find the device file name for the drive, if the NDMP host is running
NDMP protocol V3 or later:
tpautoconf -probe ndmp_host_name
d. Click This path is for a Network Attached Storage device.
e. For NDMP Host, use the drop-down to select the name of the NAS filer to which
the drive is attached.
f. When finished, click OK.
1.
Back on the Add a New
Drive dialog, enter the Drive information as required.
2.
Repeat this procedure for
each drive that must be added.
When asked whether or not to restart the Media
Manager device daemon and all robotic daemons, click Yes.
Verify that the NDMP host can access the required robots and
drives.
To verify NDMP host
access to the required devices, run the following commands on a NetBackup media
server that is authorized to access the NDMP host:
tpautoconf -verify ndmp_host_name
tpautoconf -probe ndmp_host_name
The -verify option verifies that the
NetBackup server can access the NDMP host; the -probe option lists the devices
that are visible to the NDMP host.
Checking a Media Manager
Configuration
On the NetBackup for NDMP
server, do the following:
•
On UNIX, execute /usr/openv/volmgr/bin/vmpsand verify that ltid, vmd, avrd, and any required robotic daemons are active.
On Windows, go to the NetBackup Administration Console and use the Activity
Monitor (Processes tab) to verify that the above processes are active.
•
From the NetBackup
Administration Console, use the Device Monitor to ensure that the drive is in
the UP state.
•
Adding Volumes to a Media Manager Configuration
•
Use the NetBackup Media and Device Management utility to add the volumes that you will be
using for the NDMP host backups. See the Media Manager System Administrator’s Guide for instructions.
•
Note When specifying the Robot
Control Host for a volume that will be in a robot, specify the host name for
the NetBackup for NDMP server, not the NDMP host.
Verifying NDMP Password
and/or Robot Connection
When you authorize
NetBackup access to the NDMP host and configure robots using the Administration
Console, NetBackup automatically verifies your NDMP credentials and the robotic
configuration. If desired, you can re-verify them. For example:
tpautoconf -verify ndmp_host_name
A successful verification
looks like the following:
Connecting to host
"stripes" as user "root"...Waiting for connect notification
message...Opening session--attempting with NDMP protocol version 4...Opening
session--successful with NDMP protocol version 4
host supports MD5 authenticationGetting MD5 challenge from
host...Logging in using MD5 method...Host info is:
host name
"stripes" os type "NetApp" os version "NetApp Release
7.0.0.1" host id "0033625811"
Login was successfulHost
supports LOCAL backup/restoreHost supports 3-way backup/restore
Adding NDMP Storage Units
1.
In the NetBackup
Administration Console, select NetBackup
Management > Storage Units.
2.
On the Actions
menu, select New > Storage
Unit. The New Storage Unit dialog
appears.
1.
For Storage unit name,
enter a unique name for the storage unit.
2.
For Storage unit type,
select NDMP.
3.
For On demand only: this
specifies whether the storage unit is available only when a policy or schedule
specifically requests it. If this option is not used, the storage unit is
available to any NDMP policy or schedule.
4.
For Storage device,
select the type of device for this storage unit.
5.
For NDMP host,
specify the NDMP host where the tape drive is physically attached.
Creating an NDMP Policy
On the NetBackup master
server, create an NDMP policy to configure backups of the NDMP host.
Note You can use the Backup Policy Configuration
wizard to create NDMP policies.
Creating an NDMP policy
is very similar to creating other NetBackup policy types. The following topics
explain the differences when creating NDMP policies.
See the NetBackup System Administrator’s Guide for more information on NetBackup policies and
the Policy utility.
Note To configure a policy for the NAS_Snapshot
method and SnapVault, see the NetBackup Advanced Client System Administrator’s Guide.
Attributes
Specify the following
policy attributes:
•
Policy Type: NDMP
•
◆ Policy Storage Unit:
•
If the NDMP host has more
than one storage unit and you want to direct backups for this policy to a
specific storage unit, specify the name of that storage unit.
•
For a three-way backup,
specify a storage unit that was defined for the target NDMP host with attached
tape.
•
For NDMP backup to Media
Manager devices, specify a Media Manager storage unit defined for a device
connected to a NetBackup media server (see the “Configuring NDMP Backup to NetBackup Media Servers” chapter).
Clients
In the client list,
specify the following for each client in an NDMP policy:
◆ Hostname
Name of the NDMP host
◆ Hardware and operating system
NDMP
NDMP
Files
The Backup Selections list must
specify directories from the perspective of the NDMP host.
Two examples:
/home/dir1/
/vol1
The following Backup Selections
capabilities are NOT supported for an NDMP policy:
•
Wildcards in pathnames. For example, /home/* is an
invalid entry.
•
Individual file names. Only directory
or volume names are allowed.
•
Exclude list (because client software
is not installed on the NDMP host). You can, however, exclude files by using
the SET keyword
as shown under “Using Environment Variables in Backup
Selections list.” The SET option allows you to exclude files on a backup. The format is
vendor dependent; refer to the vendor’s documentation for more details on which
variable can be passed and in what format.
Schedules
You can specify any of
the following backup types in a schedule for an NDMP policy:
•
Full
•
Cumulative Incremental
•
Differential Incremental
Specify Override policy storage unit only if this client of NetBackup (the NDMP
host) has more than one storage unit and you want to use a specific storage
unit for this schedule. In this case, the client must be the only client in
this NDMP policy.
Using Environment
Variables in Backup Selections list
NDMP allows you to use environment variables to pass configuration
parameters to an NDMP host with each backup. NDMP environment variables can be
one of the following types.
•
Defined as optional by
the NDMP protocol specification. You can set these variables.
•
Specific to an NDMP host
vendor. You can set these variables.
•
Reserved for use by
NetBackup:
FILESYSTEMLEVELDIRECTEXTRACTACL_START
In NetBackup, environment variables
can be set within the Backup Selections list by specifying one or more SET directives.
Note In the Backup Selections list, the SET directive must be the first in the
list, followed by the file systems or volumes to back up. To obtain up-to-date
information on environment variables relating to particular NAS vendors, refer
to “NetBackup for NDMP Information on the Web”
In general, the syntax of
a SET directive is as follows:
SET variable = value
Where variable is the name of the environment variable and value is the value that is assigned to it. The value
can be enclosed in single or double quotes, and must be enclosed in quotes if
it contains a space character. For example:
SET ABC = 22
SET DEF = "hello there"
SET type = tar
Setting a variable equal
to no value unsets that variable. For example:
SET ABC =
Variables accumulate as
the Backup Selections list is processed. For example, if Backup Selections
contains the following entries:
/vol/vol1
SET HIST = N
/vol/vol2
SET DEF = 20
SET SAMPLE = all
/vol/vol3
Directory/vol/vol1 will be backed up without any user-specified environment
variables. The second directory (/vol/vol2) will be backed up with
the variable HIST set to N. The third directory (/vol/vol3) will be backed up with all three of the environment variables
set.
If an environment
variable appears again later in the list, the value of this variable overrides
the previous value of the variable.
The values used in each backup are
saved and provided to subsequent restores of the directory. The NDMP host may
have environment variables that are set internally and these are also saved for
restores.