OhioHealth Manual Generic

Transcription

OhioHealth Manual Generic
OhioHealth
Manual
Generic
TSM for VE
By Data and Storage Team
Backup Administration
Created: December 2013
Contents
Introduction
3
Prerequisites
3
Naming Conventions
3
Initial Install
4
Adding a Proxy Server
5
Backing Up VMs
6
Restoring
9
Additional Information and Notes
12
Disaster Recovery
13
Summary
15
Last Updated: Friday, July 11, 2014
Introduction
TSM for Virtual Environments version 6.4 or 7.1, or TSM for VE, uses the VMWare
VStorage API to backup the guest. It places a plug-in in the VMWare Virtual Center, or
VC, which can be utilized to run and schedule backups and restores of VMWare guests.
Prerequisites
The following prerequisites are necessary:
1. Technical understanding of the VMWare infrastructure and Tivoli Storage
Manager.
2. Appropriate access rights to the VMWare infrastructure.
3. The VMWare vSphere Client, obtained from a download after pointing the url to
the VC (i.e. http://vchostname).
4. TSM for VE binaries with license from IBM Passport Advantage.
Naming Conventions





Virtual Center—VMWare virtual center
vCenter node—The virtual node that represents a vCenter
Data center node—The virtual node that maps to a data center; the data center
nodes hold the data
Data Protection for VMWare command-line interface node—The node that
connects the Data Protection for VMWare command line interface to the Tivoli
Storage Manager server and the Tivoli Storage Manager data mover node
Tivoli Storage Manager data mover node—The node name for the Tivoli Storage
Manager Backup-Archive Client that is installed on the Vstorage Backup Server
(aka proxy server). This node performs the data movement. You can have
multiple Tivoli Storage manager data mover nodes for each vStorage Backup
Server. This feature is useful when multiple schedules run in parallel on a single
server. In this scenario, each node corresponds to a scheduler instance.
Note: Each “node” created for TSM for VE must have a corresponding TSM admin
account that “owns” the client (client-owner class).*
3
Initial Install
Initial install tasks are as follows:
1. Install TSM Client using custom install and select VMWare API option.
2. Install TSM for VE Plug-in on first Proxy Server using same version as TSM
client. Only one VE Plug-in is necessary per virtual center (VC).
3. In the TSM for VE install:
a. Accept the License Agreement
b. Choose vSphere Protection
c. In the selection screen, choose all selections (Data Protection for VMware
GUI will need to be manually selected as this feature and all subfeatures)
d. Select both Register GUI as vCenter Plug-in and Enable access to the GUI
by a web browser
e. Enter the appropriate vCenter Server (as of this printing, viewvc01,
vchostname, vchostname2), vCenter User Name (vc), and vCenter
Password
f. The installation will complete and may take several minutes.
4. Next, ensure the plug-in is enabled in the VC. Login to the VC, select Plug-ins,
then Manage Plug-ins. Check to see that the Tivoli Data Protection for VMware
plug-in is enabled.
5. To complete the schedule configuration, open a web browser and point to
https://<proxyservername>:9081/TsmVMwareUI/ (example:
https://viewproxy01:9081/TsmVMwareUI/
6. Configure TSM for VE in VC using plug-in using the Configuration Wizard. Use
the Configuration Wizard only once per VC. The Configuration Wizard is never
used after the initial install. For any modifications, select Edit Configuration.
7. When a schedule is created in v7.1 or higher, TSM for VE will automatically
create the option files and the CAD scheduler on the proxy server.
8. Set the VC password for each data mover using the dsmc command (set password
-type=vm <vcname> <vc user> <vc user password>. For example, dsmc –
optfile=dsm.opt set passsord -type=vm vchostname vc vcuserpassword
9. Set the rights for the datacenter node for each option file from the command
setprompt: dsmc -asnodename=<datacenter node> -optfile=dsm.opt
10. Set up CAD and Scheduler for each data mover node/option file.
4
Adding a Proxy Server
Only one plug-in is needed, but TSM VE must be installed on each proxy server, minus
the plug-in option.
Adding a proxy server tasks are as follows:
1. Install TSM Client selecting the custom install and then add the selection for the
VMWare Api.
2. Install TSM for VE on subsequent Proxy Server using same version as TSM
client, but do NOT install the Plug-in option (known as TSM for VMWare GUI in
version 7.1).
3. Reboot when prompted.
4. Configure TSM for VE in VC using plug-in, creating data movers (currently
using 4 data movers) for the proxy.
5. Create option files for each data mover.
6. Open the TSM for VE GUI, located in a web browser at
https://proxyserver02:9081/TsmVMwareUI or at
https://proxyserver03:9081/Tsm/VMwareUI and select Configuration at the top of
the screen to create the 4 data mover nodes (do NOT use the TSM for VE web
GUI Configuration Wizard as it is completed only in the initial setup nor is it
necessary to register a node from the TSM console).
7. At Configuration, select Edit Configuration, Data Mover Nodes, Add Datamover
Node. Change the name by clicking into the name section. Double-click the Not
Set in the password column to set the password. Click OK to create the nodes on
the TSM server. Continue to add Datamover Nodes until all are added.
8. From the Proxy server, set the VC password for each data mover using the dsmc
command (set password -type=vm <vcname> <vc user> <vc user password>.
9. Set the rights for the datacenter node for each option file from the command
prompt: dsmc -asnodename=<datacenter node> -optfile=dsm.opt
10. Set up CAD and Scheduler for each data mover node/option file.
5
Backing Up VMs
The vm backup process can be initiated through the following methods:
1.
2.
3.
4.
TSM administrative console as a scheduled job
Virtual Center using the TSM for VE Plug-in
TSM GUI client on the proxy server
TSM command line client on the proxy server
TSM Administrative console VM Backup Scheduled Job
From the TSM Administrative command line interface as an administrative user, enter
the following commands:
def sched vm <schedule name> action=backup subaction=vm vmfulltype=vstor vmbackuptype=fullvm asnodename=VE_DATACENTER1
domain.vmfull="vmname1,vmname2” mode=ifi startt=hh:mm startd=mm/dd/yyyy dur=1
duru=days scheds=enh day=sun,mon,tue,wed,thu,fri,sat
Example:
def sched vm DEV_TEST_DATACENTER104_DM5 action=backup subaction=vm
options= '-vmfulltype=vstor -vmbackuptype=fullvm asnodename=VE_DATACENTER1 -domain.vmfull="lataptarec01" -mode=ifi '
startt=21:30 startd=01/28/2014 dur=1 duru=days scheds=enh
day=sun,mon,tue,wed,thu,fri,sat
TSM for VE Plug-in from within Virtual Center
This type of backup is useful for scheduling ongoing backups. The instructions below
list how to define a scheduled backup at OhioHealth. Reruns of missed or failed backups
can also be schedule in this matter by changing the “Schedule for Later” option in the
scheduling screen to “Run the backup now” (see #15, below).
1. The TSM for VE Plug-in is installed in the Virtual Center. Login to the VMWare
vSphere Client.
2. Select the appropriate plug-in for the VC with guests to be backed up.
3. Choose the Backup Tab.
4. Choose Define a Backup Task.
5. Click Next at the Welcome screen.
6. Using the proper naming conventions, name the Backup Schedule. For instance,
if the guests are in the Dev/Test cluster, the name might be
6
dev_Test_datacentername04_DM5, which indicates Dev/Test cluster on proxy
proxyserver04, using the dm5.opt file.
7. Add a description. For the above name, the description might be “Dev/Test
cluster on proxyserver04 DM5”.
8. Click Next.
9. Deselect “Newly added virtual machines are included in this backup task”
because some vms do not need backed up.
10. Expand the Data Center, which is DATACENTER1 in this example.
11. Select the vm(s) to be backed up by clicking the box next to the name of the vm.
12. Click Next.
13. Select the appropriate data mover. In this example, the data mover would be
VE_datacentername04_DM5.
14. Click Next.
15. In the Schedule screen, select “Schedule for later”.
16. In the Schedule screen, choose Backup type “Incremental”. Incremental will run
a full image backup the first time around, and then perform incremental backups
ongoing. This is the same as the command line option “mode=ifi”.
17. Click Next.
18. In the Repetition screen, select a date and time for the backup to run.
19. In the Repetition screen, click the circle next to “Back up on the following days of
the week”, then choose the days to run the backup. If this is a standard Windows
server backup, choose Monday, Tuesday, Wednesday, Thursday, Friday,
Saturday, Sunday by selecting the box next to the day of the week. Linux guests
may have a TSM client inside the guest and may only need an image backup once
a week. The design of the backups will determine what is appropriate for a guest
backup.
20. Click Next.
21. At the Ready to complete screen, verify the information then click Finish. The
backup will start at the scheduled time.
TSM Client Command Line Interface from a Proxy Server
The TSM client command line backup is useful for reruns of missed or failed vm
backups.
1.
2.
3.
4.
Login into a proxy server which is associated to the VC where the vms reside.
Go to a command prompt.
Navigate to the “C:\Program Files\Tivoli\tsm\baclient\” directory.
Enter the command: “dsmc backup vm <vmname> -asnode=<datacenter node> optfile=<optfile for the scheduled stream to use> -mode=ifi”
Example:
“C:\Program Files\Tivoli\tsm\baclient\dsmc backup vm vmname –
asnode=ve_datacentername1 -optfile=dm3.opt -mode=ifi
7
TSM Client GUI from a Proxy Server
As with the TSM client command line backup, the TSM Client GUI is another useful for
reruns of missed or failed vm backups. The GUI also offers the feature of viewing all vm
guests available, so if the exact name is not known, this interface makes it easier to find
the vm.
1.
2.
3.
4.
Login into a proxy server which is associated to the VC where the vms reside.
Open the TSM Go to a command prompt.
Navigate to the “C:\Program Files\Tivoli\tsm\baclient\” directory.
Enter the command: “dsm –asnodename=<data center node> –optfile=<name of
opt file>” (i.e. dsm –asnodename=ve_datacentername1 –optfile=dm3.opt).
NOTE: It is important to use the –asnodename= option to prevent a vm from
being backed up under the file ownership of the data mover node.
5. In the Actions menu, at the top of the screen, choose “Backup VM”.
6. Expand the + next to the Virtual Machines option.
7. Expand the + next to the ESX host name where the vm resides.
8. Select the box next to the vm to backup. More than one vm can be selected.
9. The default type of backup is “Incremental Forever – Incremental” which, in
general, is the type of backup to run.
10. Click the backup botton at the top left corner of the screen to initiate the backup.
TSM will report a completed backup state once finished.
8
Restoring
File Level Restores
Concept: The volume to restore is mounted, and then the file(s) or folder(s) selected for
recovery and placed on the original server via a mapped drive, or to a new location.
1.
2.
3.
4.
5.
Login to the proxy server (data mover) where the vm was backed up.
Open the program Data Protection for VMWare Recovery Agent.
Choose New Tivoli Storage Manager Server from the drop down box.
The Tivoli Storage Manager Server Information screen will appear.
The selections can be made a number of different ways with the same result. In
this example, select Asnodename, then the Authentication Node is the Data
Mover node. The Target Node is the Data Center node. Enter the password for
the Data Mover node.
6. Select the virtual machine, the Snapshot date, and the Disk to mount. If unsure of
the disk, use the Virtual Center in edit settings to determine which disk is the one
to mount.
7. The next screen will prompt for the drive to mount and the letter to assign on the
proxy server to be able to view the files.
8. Once mounted, the data will appear as a local drive, which, in addition to the
ability to copy files to any location, can also be mounted to the host with data
loss.
9
Example of how a mounted disk shows up as a local drive, D: in this case, on the proxy
server.
10
Full VM Image Restore
Concept: The VMWare guest is restored in its entirety, either over the existing, or to an
entirely new server. The restore can be done via the VE Plug-in located in the VC or the
TSM gui or command line client in the proxy server. A full vm image restore brings the
entire vm server backed to a previous state. If drive volumes have been excluded from
backup, the container will be restored but without the data.
1. Find the vm to restore in the VC. Take note of the host that the vm resides, and, if
you plan to restore to a different host, find another available host in the same
cluster as the original vm. The vm can be also restored to another cluster, if
desired.
2. In the VC, open the TSM for VE Plug-in and navigate to the restore tab.
3. In the drop down box, choose either “Active backups only” or “Active and
inactive backups”.
4. Open the datacenter to view all of the hosts.
5. Choose the vm and the date of the restore.
6. Right-click and select “Restore”. A restore wizard screen appears with prompts to
complete a restore.
7. Click Next on the Welcome screen.
8. Verify the source before continuing.
9. Determine where to restore the vm and enter the information in the next screen.
10. TSM for VE will give you one last chance to make any adjustments in your
selection.
11. Click Finish and the restore process will begin.
12. The restore process can be monitored in the Reports tab.
13. Once restored, the process will show as Successful. The vm will appear in the
root of the original cluster in the VC. It can be moved to the appropriate VC
resource pool.
14. The vm should be available to login at this point.
15. If the vm restores and does not have an IP address assigned, login via the console
from the Virtual Center using the local administrator (initial Administrator
account set up by server specialist who built the vm). Assign the appropriate IP
address and reboot.
11
Additional Information and Notes
1. To exclude a disk, in the dsm.opt file, first determine which disk is the one to
exclude by looking in Virtual Center in the edit settings, then enter a command
such as this:
EXCLUDE.VMDISK vmname "Hard Disk 2"
2. If a vm is restored, the uuid will change. When it gets backed up again, the
following error may occur:
ANS1715E A filespace already exists for VM (<vmname>), but with a different VM uuid () than
the current one (<valid UUID string>).
In order to resolve this error, in the dsm.opt (or dm3.opt, dm4.opt, dm5.opt), enter
the line: testflag VMBACKUP_UPDATE_UUID
http://www-01.ibm.com/support/docview.wss?uid=swg1IC82752
3. In the dsm.opt (or dm3.opt, dm4.opt, dm5.opt, etc.) the c:\mnt directory should
have the backslash as “\” and not “/”.
4. If backing up a vm and the error generated is ANS9491E, then do the following:
a. Invoke the dsmc command or type: dsmc set password –type=vmguest
<vmguestname> vcuser vcpassword
b. Note the userid and password are that of the virtual center and not the
TSM client password.
12
Disaster Recovery
In addition to being able to restore a vm to another name, host, LUN, TSM for VE also
allows recovery to an alternate Virtual Center (datacenter).
Summary of steps to restore to alternate datacenter, with this example as restoring from
DataCenter1 to DataCenter2:
1. Go to proxy on the alternate datacenter.
2. From command line: dsmc -tcps=xxx.xxx.xxx.xxx -tcpp=1500 nodename=ve_datacentername1
3. Write the password: set password -type=vm vchostname2 vc xxxxxxx
4. Restore the vm: restore vm vmname -vmname=vmname.restore datacenter=dcname -datastore=datastorename -host=vmhostname vmchost=vchostname2.domainname -vmcuser=vcusername -vmcpw=xxxxxxx
GUI Syntax for a VM Restore to an Alternate Data Center
When restoring to an alternate datacenter, do the following:
a. Go to the proxy server (data mover) in the alternate data center.
b. From the command line, navigate to “C:\Program
Files\Tivoli\TSM\baclient” directory.
c. Enter the command:
dsm -tcps=xxx.xxx.xxx.xxx -tcpp=1500 nodename=ve_datacenternode1
d. Use the GUI TSM Client Interface to find the vm and version of backup to
restore.
e. The Data Center is DATACENTER1 or DATACENTER2 and not the
virtual center host name. When restoring, ensure that the cAsE for the
data center is correct: DATACENTER1 or DATACENTER2, not
datacenter1 or datacenter2.
f. VMCHost refers to vchostname2 or vchostname1.
g. When restoring, ensure that the fully qualified ESX host name is entered:
esxhostname.domainname
h. The progress can be monitored in the TSM Server console where the
restore is running.
13
Command Line Syntax for a VM Restore to an Alternate Data Center
From the command line, here is an example of the restore commands:
1. dsmc -tcps=xxx.xxx.xxx.xxx -tcpp=1500 -nodename=ve_datacenternode
(nodename is source of what node backed up system to restore)
2. restore vm vmname -vmname=vmname.restore -datacenter=datacenter2 datastore=datastorename -host=vmhostname vmchost=vchostname2.domainname -vmcuser=vc -vmcpw=xxxxxxx
14
Summary
TSM for VE can be used to backup VMWare virtual guests without installing a TSM
client and without having to register each guest in the TSM server. The product is
included in the TSM Capacity Licensing model.
Documentation can be found at the following links:
http://pic.dhe.ibm.com/infocenter/tsminfo/v6r4/index.jsp
http://pic.dhe.ibm.com/infocenter/tsminfo/v7r1/index.jsp
15