14
HP Storage Data Protector white paper VMware Consolidated Backup integrated with Data Protector 5.5 and 6.0 Abstract ........................................................................................................................................ 2 Introduction ................................................................................................................................... 2 Limitations ..................................................................................................................................... 2 Data Protector Integration with Consolidated Backup ............................................................................ 2 Installation of Data Protector.......................................................................................................... 2 Integration scripts ........................................................................................................................ 3 Configuring VMware Consolidated Backup (VCB) Proxy........................................................................ 3 Disabling assignment of drive letters ............................................................................................... 3 Configuring Networking on the VCB Proxy ...................................................................................... 4 Installing VMware Consolidated Backup.......................................................................................... 4 VMware Consolidated Backup Modes................................................................................................ 4 SAN Mode ................................................................................................................................ 4 LAN Mode (NBD Mode)............................................................................................................... 4 Backup ......................................................................................................................................... 5 Create the backup mount point ...................................................................................................... 5 Create backup specification .......................................................................................................... 5 Image Level backup ..................................................................................................................... 5 File-level backups ........................................................................................................................ 6 Pre-exec script options ................................................................................................................ 10 Restore........................................................................................................................................ 11 Restore from image level backup.................................................................................................. 11 Restore using vcbRestore............................................................................................................. 12 Restore using VMware Convertor ................................................................................................. 12 Restore from file level backup ...................................................................................................... 13 Troubleshooting ............................................................................................................................ 13 File level backup fails for multiple drives ........................................................................................ 13 Virtual machine name contains special character ............................................................................ 14 For more information ..................................................................................................................... 14

Twp Dp60 Vcb

Embed Size (px)

Citation preview

Page 1: Twp Dp60 Vcb

HP Storage Data Protector white paper

VMware Consolidated Backup integrated with Data Protector 5.5 and 6.0

Abstract ........................................................................................................................................2

Introduction ...................................................................................................................................2

Limitations .....................................................................................................................................2

Data Protector Integration with Consolidated Backup ............................................................................2 Installation of Data Protector..........................................................................................................2 Integration scripts ........................................................................................................................3

Configuring VMware Consolidated Backup (VCB) Proxy........................................................................3 Disabling assignment of drive letters ...............................................................................................3 Configuring Networking on the VCB Proxy ......................................................................................4 Installing VMware Consolidated Backup..........................................................................................4

VMware Consolidated Backup Modes................................................................................................4 SAN Mode ................................................................................................................................4 LAN Mode (NBD Mode)...............................................................................................................4

Backup .........................................................................................................................................5 Create the backup mount point ......................................................................................................5 Create backup specification..........................................................................................................5 Image Level backup.....................................................................................................................5 File-level backups ........................................................................................................................6 Pre-exec script options................................................................................................................ 10

Restore........................................................................................................................................ 11 Restore from image level backup.................................................................................................. 11 Restore using vcbRestore............................................................................................................. 12 Restore using VMware Convertor ................................................................................................. 12 Restore from file level backup ...................................................................................................... 13

Troubleshooting............................................................................................................................ 13 File level backup fails for multiple drives........................................................................................ 13 Virtual machine name contains special character ............................................................................ 14

For more information..................................................................................................................... 14

Page 2: Twp Dp60 Vcb

Abstract

This document describes the integration of VMware Consolidated Backup1.x snapshot capabilities with HP Storage Data Protector 5.5 and 6.0.

Introduction

VMware Consolidated Backup (VCB) provides an easy-to-use, centralized backup facility that leverages a centralized Microsoft® Windows® 2003 proxy server. It enables a LAN-free backup of the virtual machines without any involvement of the ESX Server they are running on, thus minimizing the load on the ESX Server. VCB is also capable of mounting the virtual machines running Microsoft Windows operating system on the backup proxy server to enable the single file level backup.

Following are the advantages of consolidate backup:

• It reduces the load on the ESX Servers by moving the backup tasks to the backup proxy server.

• Virtual machines can be backed up even when they are powered off.

• Data center network infrastructure overloading can be avoided as the backups are LAN-free backups.

Limitations

Following are the limitations of this solution:

• The user must specify the Virtual Center Server name where the virtual machines are running.

• In case of snapshot backup, the backup proxy should have enough space to host the files of the largest virtual machine to be backed up

• Parallel backups on a single VCB host run successfully, but the snapshots of the virtual machines are not unmounted automatically. They have to be unmounted manually.

• File level backup is possible only with virtual machines running Microsoft Windows operating system.

Data Protector Integration with Consolidated Backup

This integration does not involve any special Data Protector Agent but includes pre-exec and post-exec scripts that must be run along with the Data Protector Disk Agent. The pre-exec script takes a snapshot of the virtual machine and mounts it to the backup proxy server directly from the storage area network (SAN) or local area network (LAN). The post-exec script un-mounts previously mounted snapshots and takes virtual disks out of snapshot mode.

The basic steps of installation of this integration include:

1. Installing Data Protector Disk Agent on the backup proxy server

2. Copying the provided scripts in the proper location and customizing them

Installation of Data Protector

It is necessary to install the Disk Agent on the backup proxy server to be able to back up the virtual machines presented to this host. The Media Agent should be installed where the backup device is attached. These agents can either be installed remotely or locally. For detailed installation procedure of installing Data Protector Agents, refer to the “HP Storage Data Protector Installation and Licensing Guide.”

Page 3: Twp Dp60 Vcb

Integration scripts

The VCB is integrated with Data Protector using the following scripts:

• vmwarepreexec.cmd

• vmwarepostexec.cmd

• vcbmount.js

Two of these scripts (vmwarepreexec.cmd and vmwarepostexec.cmd) should be used as backup pre-exec and post-exec scripts when configuring the Data Protector file system backup specification (datalist). The vmwarepreexec.cmd script takes the snapshot of the selected virtual machines in the specified modes and mounts them on the backup proxy host, while the vmwarepostexec.cmd script un-mounts these snapshots. These scripts call the vcbmount.js for these operations.

These scripts must be copied in the bin directory of the Data Protector installation on the backup proxy host.

Additionally one more file named vmware_passwd must be created in the config directory of the VCB installation directory on the backup proxy host.

This file should contain the name of the Virtual Center Server hosting the virtual machines to be backed up and its access details. Each line in this file contains blank-separated fields describing a single Virtual Center Server. The format of this file is as follows:

<server name> <user> <password>

The entries for the username and password should be enclosed in double quotes if they contain blanks. An example of a vmware_passwd file includes:

server1.domain.com Administrator pass1

server2.domain.com “admin user” “secret pass2”

Data Protector will scan all the Virtual Center Servers specified in this file to find out the location of the virtual machine to be backed up. Therefore, it is not necessary to specify the virtual machine locations in this file.

Configuring VMware Consolidated Backup (VCB) Proxy

All versions of Windows, except Windows 2003 Enterprise Edition and Windows 2003 Datacenter Edition, assign drive letters to each visible new technology file system (NTFS) and file allocation table (FAT) volumes. To be able to use VCB, you need to clear any unused drive letter assignments.

Note:

If you do not perform this configuration step, data corruption for virtual machines using RDM can occur.

Disabling assignment of drive letters

• Shut down the VCB proxy Server.

• Disconnect the VCB proxy Server from the SAN or mask all the LUNs containing VMFS volumes or RDMs.

• Start the VCB Proxy Server and log in as administrator.

• Open a command‐line interface.

Page 4: Twp Dp60 Vcb

• Run the Disk partition utility by typing: diskpart. The disk partition utility starts up and starts its own command prompt.

• Disable automatic drive‐letter assignment to newly seen volumes by typing at the diskpart command prompt: automount disable

• Clean out entries of previously mounted volumes in the registry by typing at the diskpart command prompt: automount scrub

• Exit the diskpart utility by typing: exit

• Shut down the VCB Proxy Server.

• Reconnect the VCB proxy Server to the SAN, or unmask all previously masked LUNs containing either VMFS volumes or RDMs.

• Start the VCB proxy server.

Configuring Networking on the VCB Proxy

Your VCB proxy needs to establish a connection to the VirtualCenter managing your ESX Server cluster or to a single ESX Server system if you do not have a cluster.

If there is a firewall between the VCB proxy and the VirtualCenter, the firewall must permit TCP/IP connections to VirtualCenter. By default, the VirtualCenter expects incoming connections at TCP/IP port 443. Establish TCP/IP connections to port 902 for all ESX Server hosts that run virtual machines you plan to back up from the VCB proxy. For more information on configuring Networking, see the ESX Server 3 Configuration Guide or ESX Server 3i Configuration Guide.

Installing VMware Consolidated Backup

Install Consolidated Backup base package on the VCB proxy.

To install the Consolidated Backup

• Log in to the VCB proxy using an account with administrator privileges.

• Install the VMware Consolidated Backup (VCB) software by running setup.exe from your CD‐ROM or electronic distribution.

• During the installation, choose an installation directory for VCB or accept the default one. The default directory is C:\Program Files\VMware\VMware Consolidated Backup Framework.

VMware Consolidated Backup Modes

SAN Mode

Select this mode when ESX Server stores its virtual machine disks on Fibre Channel SAN or iSCSI SAN. When using this mode, you can completely offload backups to a physical VCB proxy as it uses Fibre Channel, avoiding data movement over the network. In this case, if the VCB proxy is also your media agent, you can get completely LAN‐free backups of your virtual machines.

LAN Mode (NBD Mode)

Select this mode when ESX Server does not have access to a SAN, but uses local storage to store its virtual machine disks. In this mode, VCB uses an over‐the‐network protocol to access the virtual disk. The ESX Server host reads the data from the storage device and sends it across a network channel to the VCB proxy. To be able to run VCB in the LAN mode, you need to have ESX Server 3.5 or ESX Server 3i version 3.5 or later. If you are using VirtualCenter, make sure to have version 2.5 or later installed. Your virtual disks cannot be larger than 1TB each.

Page 5: Twp Dp60 Vcb

Backup

The basic steps of backup include:

• Create a directory on the backup proxy to host the snapshots of the virtual machines.

• Create the Data Protector backup specification to include this directory.

• Specify pre- and post-exec scripts to the backup specification.

• Modify the backup specification if file level snapshots are made.

Create the backup mount point

For hosting the snapshots on the backup proxy host, a mount point—a windows directory—must be created. Each virtual machine will be mounted under this mount point under its own subdirectory with the name of virtual machine. The following must be considered when creating this mount point.

All the virtual disk files are copied in this directory in case of image level backup. Since Data Protector takes the snapshots of all the specified virtual machines sequentially, the partition containing this directory should have free space to hold the files of the largest virtual machine to be backed up. The size of the virtual machine can be discovered by querying the ESX Server in the Virtual Infrastructure client.

Since all the files are copied to this directory locally and then transferred to tape, increased disk activity is expected during the backup process. It is therefore advised to create this directory on a separate partition than the operating system for better performance.

Create backup specification

The next step is to create the backup specification. The following is a brief description of the steps to be taken. For the detailed procedure and explanation of these steps, refer to the Data Protector online help.

Image Level backup

1. In the backup context, create a file system backup by using the “Blank Filesystem Backup” template. Select the newly created directory as the source of the backup.

2. Select the backup device in the next screen and specify the device-specific options if needed. On the next screen, in backup specific options, fill in the pre- and post-exec scripts are described in Figure 1. On the scheduling screen, specify the scheduling if necessary.

Note:

Image level backups are supported for all guest operating systems.

Page 6: Twp Dp60 Vcb

Figure 1.

File-level backups

1. In the backup context, create a file system backup by using the “Blank Filesystem Backup” template. Do not select any source of the backup. Click next.

2. Select the backup device in the next screen and specify the device-specific options if needed. On the next screen, in backup specific options, fill the pre- and post-exec scripts are described in Figure below. On the scheduling screen, specify the scheduling if necessary.

Figure 2.

3. On the next screen, the backup object summary will be displayed. Since the source is not selected

in the first step, the backup source must be specified here before saving the backup specification. To specify the source in such cases, follow these steps.

Page 7: Twp Dp60 Vcb

a. To specify the backup source, click Manual Add. Select Windows Filesystem as the type of object and click Next.

Figure 3.

b. On the next screen, specify the backup proxy server as the client system. For specifying the

mount point, follow these instructions:

The virtual machines are mounted under the mount point or the directory previously created under their own directory. Two default directories are created under this directory, which are called digits and letters. For each drive (partition) in the virtual machine, a subdirectory is created under the digits directory, with numbers 1, 2, 3, and so on. These directories are mapped to directories in the letters directory. The directory names in the letters directory correspond to the drive letters of the virtual machines. This structure is easy to specify as the mount points and we will be using it as our references.

Using the preceding reference, the following mount points should be specified for each virtual machine drive to be backed up:

<mount_point>\<vm_name>\letters\<drive_letter>

For example, if the mount point was created as c:\images and you want to back up the c drive of the virtual machine named Win2k3, the mount point will look like following:

c:\images\Win2k3\letters\c

Page 8: Twp Dp60 Vcb

Figure 4.

c. Repeat the same procedure for specifying other drives in the virtual machine. For example, the

‘e’ drive in the same virtual machine can be specified as c:\images\Win2k3\letters\e

4. For taking partial files backup, follow these steps.

a. Specify the VCB proxy server as the client system. Specify the mount point: e.g. c:\

Figure 5.

b. After specifying the mount points, specify the filters if only specific objects should be included

or excluded in the backup. Here specify the mount directory and entire path to the directory or particular file to be backed up.

For example: \images\Win2k3\letters\c\example

Page 9: Twp Dp60 Vcb

Figure 6.

5. Specify the other windows object specific options and click Finish

Incremental backup

With the VCB version 1.1, VCB supports file level incremental backups for virtual machines running Microsoft Windows operating system. In case of incremental backup, Data Protector backs up files that have changed since the last backup.

Note:

Turn off the Windows archive bit and change journal functions for incremental backups as these functions require Data Protector to alter the file system being backed up, which is not possible in this case.

To enable incremental backup, perform these steps

1. In the Backup object summary, select properties of the file system object.

2. In the WinFS Options tab, select “Do not use archive attributes” as shown in the figure below.

Page 10: Twp Dp60 Vcb

Figure 7.

Pre-exec script options

The pre-exec script, vmwarepreexec.cmd, needs a few options to be specified to know which virtual machines are to be backed up, which type of snapshot is to be made, and where these snapshots are to be mounted. These options and their descriptions are given in the following table.

Option Value Default Mandatory/optional Description

-a <vmname>, [<vmname>]

- Mandatory List of virtual machines to back up. You can specify “all” instead of exact

name.*

-r <mountpoint> - Mandatory Mount point. It must be the same directory as chosen in the source tab. The images will be mounted under <mountpoint>/<vmname>/ directories.

-h <server> All the servers specified in the vmware_passwd file

Optional This option is used to find specified virtual machines on specified Virtual Center Servers.

-t <type>

Options:

fullvm or file

fullvm Optional Backup type:

Fullvm—image level backup

File—file level backup

-m <mode>

Options:

san | nbd | nbdssl

san Optional Underlying storage type. For disks presented on both ESX Server and backup host through SAN, NAS or iSCSI, choose “san” In case of LAN based backups, select “nbd” or “nbdssl”

-preview - - Optional Do not perform mount, only echo commands that would be otherwise executed.

User options

- - Optional All other options which will be passed to

vcbMounter as they are**.

Page 11: Twp Dp60 Vcb

Notes:

* “all” option does not work with “file” option since individual mount points need to be specified.

** For all the available options, check vcbMounter –help.

Following are the examples of typical pre-exec commands:

• vmwarepreexec.cmd –a Win2k3,rhel5 –r c:\images

This will mount the virtual machines Win2k3 and rhel5 under c:\images using the default option fullvm.

• vmwarepreexec.cmd –a all –r c:\images

This will mount all the virtual machines on all the ESX Servers specified in vmware_passwd file under c:\images using the default option fullvm.

• vmwarepreexec.cmd –a Win2003x32 –m nbd –r c:\images

This will mount the virtual machines Win2003x32 under c:\images using over the local area network (LAN), so that the image level backup is possible even this virtual machine resides on the local data store of the ESX server not directly accessible by VCB Proxy.

• vmwarepreexec.cmd –a Win2k3 –r c:\images –t file

This will mount the virtual machines Win2k3 under c:\images using the file option, so that the file level backup is possible.

The post-exec command does not need any parameters. If for some reason the vmwarepostexec.cmd fails to un-mount the snapshots, it is possible to run this command manually or the snapshots can be removed by the vcbMounter command.

Restore

For the restore of the backups made with the preceding procedure, some special steps must be taken. There is also a difference in the process of restore according to the way the snapshots are made. The differences and the process of restores are described in the following sections.

Restore from image level backup

To restore Image Level VM, first make the virtual machine files available to the ESX Server. To make the virtual machine files available to the ESX Server, the following alternatives can be used.

• Restore the virtual machine files on the backup proxy and share the restored directory over CIFS with the ESX Server. The advantage in this method is that there is no need to install additional Data Protector Agents in the network. The disadvantage of this method is that the administrator of the backup proxy server must be involved in the restore process as well.

• Add ESX Server as Data Protector Client and restore the files in a directory on it. The advantage of this method is that the recreation of the virtual machine is faster as the vcbRestore command reads the files from local storage. The disadvantage in this method is that the restore takes slightly more time as the data transfer takes place over the network.

• Restore the virtual machine files on any virtual machine in the network and share the restored directory over CIFS or NFS with the ESX Server. This method removes the involvement of the administrator of the backup proxy in the restore process.

After the files are available on the ESX Server, there are two alternatives for recreating virtual machines, namely using vcbRestore and using VMware Convertor, a tool available from VMware.

Page 12: Twp Dp60 Vcb

Note:

Virtual machine must be suspended or shut down before restore. This command can also be used for restoring deleted virtual machines.

Restore using vcbRestore

After the files are available on the ESX Server, log on to the ESX Server and issue following command to restore the virtual machine.

vcbRestore -h <target ESX Server> -u <username> -p <password> –s

<directory of Image Level VM files> -b <overwrite>

Where -b is the behavior specifying how it should behave if it encounters the original files. The options that can be specified are - overwrite, prompt, keep, abort.

There is also a possibility to run the vcbRestore command without mounting the source files. This can be achieved by specifying the scp command in the source option as follows:

vcbRestore -h <target ESX Server> -u <username> -p <password> –s

scp://[email protected]:/<source_directory>

Restore using VMware Convertor

Virtual machines can also be recreated using VMware Converter. Using VMware Converter has many advantages over other methods of restoring a backup image. Besides restoring a virtual machine directly to the ESX Server host or Virtual Center, VMware Converter can also customize the virtual machine as it is restored. This gives you an easy way to change networking parameters for the virtual machine. This means that you can use a VCB image as a template to provision multiple virtual machines.

After starting VMware Converter, select the VCB images which we have just restored as source data.

Figure 8.

Page 13: Twp Dp60 Vcb

After selecting the source files, specify the destination options, customize the virtual machine if needed and deploy the VM.

Figure 9.

For detailed instructions on using VMware Converter, please refer to the product documentation provided by VMware.

Note:

On ESX 3i vcbRestore command is not available hence this is the only method to restore the virtual machines.

Restore from file level backup

To restore individual files from a file level backup, the following alternatives can be considered.

• Restore the files on the backup proxy server, and make them available to the individual virtual machines. This method has the disadvantage of involvement of administrators from both sides. However, deployment of an additional Disk Agent can be avoided.

• Deploy Data Protector Backup Agents in each virtual machine and then select Restore to New Location from the restore context. In this case, the virtual machine can be selected as the new client and the original location of the files can be selected. The Overwrite option should be specified if

Troubleshooting

Following are typical troubleshooting scenarios and their solutions.

File level backup fails for multiple drives

Problem: During the file level backup of a virtual machine, pre-exec script fails to create and mount the snapshot of the virtual machine if the disks of virtual machine are located on different datastores.

Page 14: Twp Dp60 Vcb

Solution: This is a known limitation in VCB. When multiple disks are created on different datastores, Virtual Infrastructure client creates these disks with the same default name. Therefore, the creation of snapshot fails. This can be avoided with the following procedure:

1. Be sure no snapshots exist for the virtual machine. If they do, suspend or power off the virtual machine and use the VC snapshot manager to delete them.

2. Power off the virtual machine.

3. Remove one or both of the disks using VC edit settings for the virtual machine. Do not delete the data from the vmfs volume; only remove the disk from the virtual machine.

4. Rename one or both of the disks using the vmkfstools utility on the ESX Server. For example, to rename the disk for the VM WinVM1, existing on VOL-2 datastore, run the command:

vmkfstools -E ‘/vmfs/volumes/Vol-2/WinVM1/winvm1.vmdk’

‘/vmfs/volumes/Vol-2/WinVM1/winvm1-data1.vmdk’

5. Add one or both of the disks back to the virtual machine using VC or by editing the settings for the virtual machine.

This solution is documented by VMware in the knowledgebase at:

http://kb.vmware.com/vmtnkb/search.do?cmd=displayKC&docType=kc&externalId=5096672&sliceId=SAL_Public

Virtual machine name contains special character

Problem: If the virtual machine name contains a special character, the backup fails with a message “Virtual Machine not found.”

Solution: The special characters in the virtual machine name are translated according to the URL encoding standards before mounting. Hence, all the slashes are converted to the corresponding escape character. Therefore, the encoded names should be specified in the pre-exec command as well as when specifying the source mount points.

For example, the name of a virtual machine name is Win2k3/new. While it will be mounted under the directory Win2k3%2fnew, this name should be specified for the pre-exec command and for the source mount point in case of file-level backup.

For more information

www.hp.com/go/dataprotector www.vmware.com

© 2007 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation.

4AA1-0644NW, February 2007