TSM Backup VM scheduling.
2I know that I'm someone who struggles with doubt when I RTFM, so I always like to see examples of how someone successfully has implemented a solution. This held true when I tried to find a way to schedule my VM backups. I read, but wasn't certain how to get this to work. I then stumbled up on this blog:
Scheduling TSM VMware Backups
and
TSM Full-VM Image Backup With VStore API
In summary the solution was to create a separate options file & node for each group of VM guests that you wanted to schedule together. So if there are five vm guests that you want to backup on a single schedule, then you group them together in their own options file. If there is a certain VM Guest that needs to be handled individually? Then put that one in its own options file under its own nodename.
Now here was the breakthrough that I hadn't considered. Create a new node for each of those options files.
To give an example.
I have a vCenter server called 'vcenter' and it talks to 5 ESX servers, each with a variable number of guests. I then have a vproxy server called 'servia02'. Servia02 is just a Win2008 server with the v6.2.3.0 BA client installed and network connectivity to the vcenter and tsm servers. Make sure to install the optional VM tools when the BA client is installed.
On vcenter there are 20 vm guests. I will call them vmguest01 - vmguest20 for this example.
Now on my proxy 'servia02' I great a normal options file without any vm specifics. This will backup its Win2008 environment normally. On the tsm server I create a node called 'servia02' and associate it with a the normal backup schedule for nightly backups of servers.
Now on to the VM guests.
I create a 2nd options file called "dms_vm1.opt". In here I will define which vm guests will be associated with this "vm1" tagged profile. On the tsm server I create a new node called 'servia02-vm1'. I can now schedule this node independent from the others. In this 'vm1' profile, I will add vmguests 'vmguest01 - vmguest05'
I will repeat this great some more profiles.
'servia02-vm2' will contain vmguests 'vmguest06' & 'vmguest07'
'servia02-vm3' will contain vmguest 'vmguest08'
The remaining guests I leave unscheduled in this example.
I will give each profile its own logfiles by defining them in the respective options file. On the tsm server a node is created (ie registered" for each profile.
So in this example we would need four nodes on the tsm server.
servia02, servia02-vm1, servia02-vm2, and servia02-vm3.
Code:
Node Name vmGuests Opt File Error Log Sched Log Scheduler Schedule
============ ========= =========== ============= ============= ================= ================
SERVIA02 none dsm.opt Error.log DSMSched.log TSM Scheduler nightly_1am
SERVIA02-VM1 vmguest01 dsm_vm1.opt VM1_Error.log VM1_Sched.log TSM Scheduler VM1 nightly_1am-VM1
vmguest02
vmguest03
vmguest04
vmguest05
SERVIA02-VM2 vmguest06 dsm_vm2.opt VM2_Error.log VM2_Sched.log TSM Scheduler VM2 nightly_12am-VM2
vmguest07
SERVIA02-VM3 vmguest08 dsm_vm3.opt VM3_Error.log VM3_Sched.log TSM Scheduler VM2 nightly_2am-VM3
dsm_vm1.opt
Code:
*========================================================================
*
* TSM VM Options File for VMWare guest schedules
*
* Modifications: DJO 6/20/2011 for VMWare VStore usage
*
* Use the following command to create a schedule service on the client
*
* dsmcutil install /name:"TSM Scheduler VM1" /node:"servia02-vm1"
* /password:"vXLu7ifB" /optfile:"dsm_vm1.opt" /startnow:Yes /autostart:Yes
*
*========================================================================
NODENAME servia02-VM1
TCPSERVERADDRESS tsmserver
tcpport 1500
SCHEDLOGR 30 D
ERRORLOGR 30 D
Passwordaccess Generate
COMPRESSION NO
DEDUPLICATION NO
SCHEDMODE POLLING
RESOURCEUTILIZATION 10
*========================================================================
* Define log file names
*========================================================================
ERRORLOGNAME "C:\Program Files\tivoli\tsm\baclient\VM1_Error.log"
SCHEDLOGNAME "C:\Program Files\tivoli\tsm\baclient\VM1_Sched.log"
*========================================================================
VMFULLTYPE VSTOR
VMCHOST vcenter // hostname of the vcenter server
VMCUSER Administrator
VMCPW ****
VMBACKUPTYPE FULLVM
VMFULLTYPE VSTOR
DOMAIN.VMFULL "vmguest01,vmguest02,vmguest03,vmguest04,vmguest05"
dsm_vm2.opt
Code:
*========================================================================
*
* TSM VM Options File for VMWare guest schedules
*
* Modifications: DJO 6/20/2011 for VMWare VStore usage
*
* Use the following command to create a schedule service on the client
*
* dsmcutil install /name:"TSM Scheduler VM2" /node:"servia02-vm2"
* /password:"vXLu7ifB" /optfile:"dsm_vm2.opt" /startnow:Yes /autostart:Yes
*
*========================================================================
NODENAME servia02-VM2
TCPSERVERADDRESS tsmserver
tcpport 1500
SCHEDLOGR 30 D
ERRORLOGR 30 D
Passwordaccess Generate
COMPRESSION NO
DEDUPLICATION NO
SCHEDMODE POLLING
RESOURCEUTILIZATION 10
*========================================================================
* Define log file names
*========================================================================
ERRORLOGNAME "C:\Program Files\tivoli\tsm\baclient\VM2_Error.log"
SCHEDLOGNAME "C:\Program Files\tivoli\tsm\baclient\VM2_Sched.log"
*========================================================================
VMFULLTYPE VSTOR
VMCHOST vcenter // hostname of the vcenter server
VMCUSER Administrator
VMCPW ****
VMBACKUPTYPE FULLVM
VMFULLTYPE VSTOR
DOMAIN.VMFULL "vmguest06,vmguest07"
dsm_vm3.opt
Code:
*========================================================================
*
* TSM VM Options File for VMWare guest schedules
*
* Modifications: DJO 6/20/2011 for VMWare VStore usage
*
* Use the following command to create a schedule service on the client
*
* dsmcutil install /name:"TSM Scheduler VM3" /node:"servia02-vm3"
* /password:"vXLu7ifB" /optfile:"dsm_vm3.opt" /startnow:Yes /autostart:Yes
*
*========================================================================
NODENAME servia02-VM3
TCPSERVERADDRESS tsmserver
tcpport 1500
SCHEDLOGR 30 D
ERRORLOGR 30 D
Passwordaccess Generate
COMPRESSION NO
DEDUPLICATION NO
SCHEDMODE POLLING
RESOURCEUTILIZATION 10
*========================================================================
* Define log file names
*========================================================================
ERRORLOGNAME "C:\Program Files\tivoli\tsm\baclient\VM3_Error.log"
SCHEDLOGNAME "C:\Program Files\tivoli\tsm\baclient\VM3_Sched.log"
*========================================================================
VMFULLTYPE VSTOR
VMCHOST vcenter // hostname of the vcenter server
VMCUSER Administrator
VMCPW ****
VMBACKUPTYPE FULLVM
VMFULLTYPE VSTOR
DOMAIN.VMFULL "vmguest08"
Next when you create the scheudle you will have to define the action "backup" and the subaction as "vm". If you have the TDP for VE, then you can even use the options field to specify incrementals.
Code:
tsm: tsmserver>q schedule DOMAIN-EXAMPLE NIGHTLY_12am-VM2 f=d
Policy Domain Name: DOMAIN-EXAMPLE
Schedule Name: NIGHTLY_12am-VM2
Description: VM Incremental Daily backup for vmguest06 & vmguest07
Action: Backup
Subaction: VM
Options:
Objects:
Priority: 5
Start Date/Time: 06/28/11 04:30:00
Duration: 1 Hour(s)
Schedule Style: Enhanced
Period:
Day of Week: Sun,Mon,Wed,Thu,Fri,Sat
Month: Any
Day of Month: Any
Week of Month: Any
Expiration:
Last Update by (administrator): ADMIN
Last Update Date/Time: 09/12/11 18:17:52
Managing profile:
If you wish to access the vm backups via the client command line or gui, just specify the respective option file when you start the client.
dsm -optfile=dsm_vm2.opt
dsmc -optfile=dsm_vm2.opt
You can even use this to edit the preferences via the gui if you prefer, which is good for supplying the vcenter password.
Finally, you will need to create a scheduler for each node that is defined. You can see in the comments in my dsm_vmX.opt files the command used to add it via the command line. But I prefer to use use the GUI and setup wizard.