4 4 3 Tigon:Automating Backup of Virtual Machines

From SEPsesam
Revision as of 16:00, 6 August 2018 by Sta (talk | contribs) (Added /4.4.3 Grolar in the nav box.)

Copyright © SEP AG 1999-2024. All rights reserved.

Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.

Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3 Tigon/4.4.3 Grolar. For previous documentation version(s), check VMware archive.


Overview

SEP sesam lets you back up data that resides in VMware VMs. Until now, you had to create a separate backup task for each VM to perform backup. But as the number of virtual servers increases – in the dynamic environment new VMs are created and deleted every day – a manual backup task configuration becomes quite tedious and time consuming.

With SEP sesam 4.4.3 Tigon, you can automate backup of VMs by including VMs to task groups according to the selection filter and automating operation of creating backup tasks for VMs. Use this option whenever a new vCenter or ESXi host is added and there are a lot of new VMs present that need to be backed up.

New option Create VM tasks scans through vCenter Server host for available virtual machines and allows the administrator to create a task group based on selected filters. SEP sesam provides a script with functions that handle task creation and execution for VMs. A script execution can be configured to delete tasks assigned to non-existing VMs or remove the group-related tasks before creating a new one. Depending on the selection in GUI, only VMs without task(s) can be backed up or the previously assigned tasks get deleted before new are created.

Prerequisites

Prior to performing a backup, make sure you have completed the required steps to prepare the VMware environment for backing up:

Steps

When a new vCenter or ESXi host is added, you can automate backup of new VMs by creating a task group and generating a task for grouped VMs.

Creating a task group

  1. From Main Selection -> Tasks -> By Groups, click New task group. The New task group window opens.
  2. Enter the Group name, e.g., VM_01, and click OK.
  3. Task group VM.png

Your next steps will depend on the SEP sesam version you are using (Tigon v. 1 or 2). For details on SEP sesam versions, see SEP sesam Release Versions.

Selecting VMs for a task group in 4.4.3 Tigon v.2

  1. From Main Selection -> Tasks -> By Clients, right-click the vCenter client and select Manage VM tasks. A new window opens.
  2. Right-click-manage VM tasks.png
  3. From the Task Group drop-down list, select previously created task group. In the content pane, expand or collapse the following options to see all matching VMs displayed: VMs without task, VMs with task, VM tasks without existing VM. The list below the selection shows VMs and their attributes, e.g., operating system, client, hostsystem, datacenter, etc.
  4. Manage VM tasks window.png
  5. Backup as image: By default, this option is enabled and performs a FULL raw backup of VMDK without CBT. However, CBT is applied for subsequent differential and incremental backups. If Backup as Image is NOT selected, CBT is fully utilized. For details on how this affects the size of your backed up data, check VMware single file restore & instant recovery support matrix.
  6. Filter: Once you have selected the task group and backup type (as image or not), you can filter VMs to show only matches based on the following categories. Note that filtering is exclusive and displays only the VMs that meet all your selection criteria.
    • VM name contains and VM name does not contain: In both cases enter a part of the name you want to be included or excluded from your filter.
    • Datacenter: If you have multiple data centers, you can filter VMs accordingly.
    • Power State: Use the drop-down list to filter the VMs according to their current state: on (indicates that the virtual machine is active and functional) or off (the VM is shut down).
    • Operating System: Choose one or more guest operating system(s) by selecting the check box(es) before the OS and clicking OK to confirm.
    • Folder: Filter by specific folders.
    • Virtual App: Filter by vApps and the virtual machines they contain.
  7. Optionally, use the Attributes to narrow the scope of displayed VMs. Use the Name drop-down list and/or Value. Only one attribute can be selected from a predefined group of attributes.
  8. SEP Tip.png Tip
    Use a powerful Attributes feature to enable smart grouping of existing or new VMs that fit certain criteria for backups. For example, you can set a specific attribute Backup and then specify the value yes (include) (or no as exclude) to filter and group all virtual machines that have this attribute set. You can refine your attributes by adding additional values to them. For example, you can add additional values daily, weekly etc., to your attribute Backup. Note that SEP sesam only lists the attributes that are created with VMware vSphere Client and stored with vCenter Server. For details on how to create custom attributes, see VMware documentation. If you are using the VMware web interface for creating the attributes, refer to article Custom Attributes in the vSphere Web Client.
  9. In the content pane, expand or collapse the following options to see all matching VMs displayed: VMs without task, VMs with task, VM tasks without existing VM.
    Information sign.png Note
    Each task group can hold multiple VMs that may be included in more groups and may have different tasks assigned to them. If the option VMs with tasks is selected while creating VM tasks, the group assignments for the respective tasks and the tasks themselves are deleted.
    Select or clear the check box before the option (or an individual VM) to include or exclude VMs for which the tasks will be created within the task group.
  10. Click Create command to generate the command, which will be used to preload a script for VM tasks generation. Select the generated command and copy it, then click Edit config file in the Create command dialog. In the new Edit Pre Task Group Interface window, select the line starting with # sm_cmd "dir", delete it and paste the generated command in the same line. For details on command description and its options, see the preloaded script for VM tasks generation below.
  11. Create command.png
  12. Click Apply to save your selection and add VMs to the task group. A message notifies you that the process of adding tasks was successful. Click OK.

Selecting VMs for a task group in 4.4.3 Tigon v.1

  1. From Main Selection -> Tasks -> By Clients, right-click the vCenter client and select Create VM tasks. A new window opens.
  2. Right-click-create VM tasks.png
  3. From the Task Group drop-down list, select previously created task group. Then select among the following options:
    • Backup as image: By default, this option is enabled and performs a FULL raw backup of VMDK without CBT. However, CBT is applied for subsequent differential and incremental backups. If Backup as Image is deselected, CBT is fully utilized. For details on how this affects the size of your backed up data, check VMware single file restore & instant recovery support matrix.
    • Search: Once you have selected the task group and backup type (as image or not), you can use the case-sensitive search to filter the VMs.
    • Optionally, use the Power State drop-down list to filter the VMs according to their current state. From the drop-down list, select On (indicates that the virtual machine is active and functional) or off (the VM is shut down).
    • From the Operating system drop-down list, choose one or more guest operating system(s) by selecting the check box(es) before the OS and clicking OK to confirm.

    Create VM tasks 02.png

  4. In the content pane, expand or collapse the following options to see all matching VMs displayed: VMs without task, VMs with task, VM tasks without existing VM.
    Information sign.png Note
    Each task group can hold multiple VMs that may be included in more groups and may have different tasks assigned to them. If the option VMs with tasks is selected while creating VM tasks, the group assignments for the respective tasks and the tasks themselves are deleted.
    Select or clear the check box before the option (or an individual VM) to include or exclude VMs for which the tasks will be created within the task group.
  5. Click Apply to save your selection and add VMs to the task group. A message notifies you that the process of adding tasks was successful. Click OK.

Generating VM tasks

This step is not required if you used Manage VM tasks option with Tigon v.2 and you have already copied the command to the Edit Pre Task Interface window.

  1. Switch back to the Tasks by Groups tab (Tasks -> By Groups) and select previously created task group. The included VMs are displayed below the task group. Right-click the task group and select Properties.
  2. In the properties window, two lists of tasks are shown. The list on the left is the list of all available tasks and the list on the right shows your newly created group of tasks. Click the Customize Task List button above the lists.
  3. Information sign.png Note
    Use the Customize Task List option whenever new VMs are created after the last backup was run. Uncommenting and saving the script triggers the tasks generation according to the specified parameters.

    VM task group properties.png

  4. In the Edit Pre-Task-Group Interface of client ... window, remove the # at the start of the line before the script sm_cmd "dir" in order to uncomment it.
  5. Pre-task-group interface.png
    The preloaded script for VM tasks generation is as follows: sm_cmd "dir" -F JSON "vsphere" -k 'Backup required=yes' /<vCenter_name>| sm_cmd add vspheretask "vsphere_{{client}}_{{source}}_{{count}}" -t "VMWare vSphere" -O "remove_all" -G $1 -a refresh=true -T _IMG -o -f - where
    • <vCenter_name> is the case-sensitive name of the vCenter as defined in the SEP sesam environment
    • "vsphere_{{client}}_{{source}}_{{count}}" describes the name of the VM task, composed of the task type "vpshere_", followed by {{client}}_ which is the name of the vCenter, then {{source}}_which is the name of the VM (without special characters), then {{count}} which is used to define a unique task name if more than 50 characters for task are used and any other VM might have the same name
    • the following options specify the type of VMware backup: "-T _CONFIG" defines VM configuration backup, "-T _IMG" is the same as the GUI option Backup as image and is used by default, and "-T NONE" defines CBT FULL backup.
    • the following options can be set:
    • -G <group name> #primary group -g group1[,group2] #additional groups to add tasks into -k #search in the view of all VMs and utilize a quick sort based on attributes Backup required=yes -O remove_non_existing #delete all tasks for VMs not existing anymore -O remove_all #delete all tasks belonging to task group before creating new ones -O add_non_exiting #create a task even if the VM does not exist -O remove_only #delete all tasks for VMs not existing anymore, but do not add new tasks -a refresh=true
  6. Save any changes you made.

When a backup job for the group is started, tasks are performed concurrently on the drives if possible. Other tasks are dynamically assigned to the backup devices by SEP sesam. You can view the status of the whole task group by selecting Last backup state in the Main selection window. The backup status overview provides detailed information on the last run of backup jobs, including the task name, start and stop time of the last backup, backup level, data size, throughput, assigned media pool, etc.

See also

VMware BackupChanged Block Tracking (CBT)VMware requirements & restrictionsVMware single file restore & instant recovery support matrix