Source:Automating Backup Process: Difference between revisions

From SEPsesam
(Started draft for 27881 - General multi task generation by GUI)
 
(In progres.)
Line 45: Line 45:
|}</div>
|}</div>
<translate>
<translate>
SEP sesam lets you back up all kinds of data in different environments. 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, you can back up all kinds of data in different virtual environments. But as the number of virtual servers increases - new virtual machines (VMs) are created and deleted every day in the dynamic environment - manual configuration of backup tasks becomes quite tedious and time-consuming.


To simplify the backup of multiple VMs, you can automate the process by creating a new task group and using the TBDoption which enables including VMs to task groups according to the selected filter.
To simplify the backup of multiple VMs, you can automate the process by generating tasks for each supported hypervisor and also clients for VMs to which the generated tasks are assigned and for which ACLs can be assigned. It is recommended to use these features whenever a new hypervisor is added and there are many new VMs that need to be backed up.
 
The ''Manage VM tasks'' option scans the hypervisor host for available VMs and allows the creation of a task group based on the selected filters. SEP sesam provides a script with functions that handle the creation and execution of tasks for VMs. The script execution can be configured to delete the tasks assigned to the non-existing VMs or to remove the group-related tasks before creating a new one.
 
====Task creation====
{{anchor|syntax}}The following syntax is used for generating VM tasks:</translate>
sm_cmd dir -F JSON client –l 1 <client or vm server> [filter options] | sm_cmd add taskgen <task name>  -t <task type> -G <task group> -O <option> -f -
<translate>
where</translate>
<ul><li><translate>
''<client or vm server>'' is the case-sensitive name of the client or VM server as defined in the SEP sesam environment</translate></li>
<!--<li><translate>
''"vsphere_<nowiki>{{client}}_{{source}}_{{count}}</nowiki>"'' describes the name of the VM task, composed of the task type ''"vpshere_"'', followed by ''<nowiki>{{client}}_</nowiki>'' which is the name of the vCenter, then ''<nowiki>{{source}}_</nowiki>''which is the name of the VM (without special characters), then ''<nowiki>{{count}}</nowiki>'' 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</translate></li>--></ul>
 
 
<translate>
The following options can be set:</translate>
<translate>
-G <group name>            #refers to the task group and is not mandatory (unless the -O option is used)
-g group1[,group2]          #additional groups to add tasks to
-k                          #search in the view of all VMs and uses a quick sort based on attributes Backup required=yes
-O remove_non_existing      #delete all tasks from the task group for VMs that no longer exist</translate>
<translate>
-O remove_all              #delete all tasks belonging to the task group before creating new tasks
-O add_non_exiting          #create a task even if the VM no longer exists
-O remove_only              #delete all tasks for VMs not existing anymore, but do not generate new tasks
-O source_not_found              #generate tasks only if no other task in the same task group is associated to the VM
</translate>
 
<translate>
*When a task is generated, the flag 'auto_generated' is set.
*If a task is deleted due to the options 'remove_non_existing', 'remove_all' or 'remove_only', the associated backup data is not deleted.
 
 
====Client generation====
To automatically generate virtual clients for VMs with SEP sesam, the following parameters must be specified:
-n client name: If set, a client will be generated for each virtual machine passed. The following placeholders are allowed:
'_AUTO_' (use virtual machine guest host name)
'_IP_' (use the guest IP address of the virtual machine)
'_AUTO-DNS_' (resolve virtual machine guest IP address to host name)
{{note| Placeholders only work if the required attributes, such as the host name or IP address, are available. At this time, '_AUTO-DNS_' and '_IP_' only work with VMware vSphere.}}
-L location for generated VM client: If the location or location tree cannot be found, it is automatically generated. If the location is not specified, the root location is used.
-w operating system of the generated virtual machine client: If set to '_AUTO_', the operating system is guessed from the virtual machine. {{note| Placeholders only work if the required attributes such as guest operating system are present.}}
The following attributes are automatically set for the generated client:
*Client is virtual machine
*Access mode = VIRTUAL
*Virtual server name is set by the client of the task.
*Name of the virtual machine, if available.
*Operating system, if available (default LINUX).
*Auto_generated
Tasks are assigned to the client. In the ''Topology'' view, they are displayed twice: once under generated client and once under VM server.
 
 
====Task grouping====
You can add all tasks for a backup target or other tasks with similar characteristics to a task group and trigger all tasks with a single event.</translate>
<ol><li><translate>
From ''Main Selection'' -> '''Tasks''' -> '''By Groups''', click '''New Task Group'''. The ''New Task Group'' window opens.</translate></li>
<li><translate>
Enter the '''Group name'''. Under '''Tasks for this group''', select the tasks (from the list of all available tasks on the left) and add them to your newly created task group list.</translate></li>
<li><translate>
If you want to start a job for the task group immediately, right-click the task group name and click '''Immediate Start'''. If you want to schedule the task group, click '''New Schedule''' under '''Main Selection''' -> '''Scheduling''' -> '''Schedules'''.</translate></li></ol>
 
{{<translate>
note</translate>|
*<translate>
A task group must always be linked to a schedule that has a corresponding event attached to it. For details on creating the whole scheduled event setup, see [[Special:MyLanguage/Standard_Backup_Procedure|Standard Backup Procedure]].</translate>
 
*<translate>
If you already have a configured schedule, you can link your task group to it by clicking the ''Schedules'' tab when you create a task group or later in the ''task group'' properties window. Once you have configured a schedule, you have to create a new event for it.</translate>}}
 
<translate>
When a backup job is started for the group, the tasks on the drives will run simultaneously if possible. Other tasks are dynamically assigned to backup devices by SEP sesam. You can view the status of the entire 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==  
==See also==  
[[Special:MyLanguage/Standard_Backup_Procedure|Standard Backup Procedure]] – [[Special:MyLanguage/4_4_3_Beefalo:Task_Name_Template_–_Backup|Task Name Template – Backup]] –[[Special:MyLanguage/4_4_3_Grolar:Disabling_and_Enabling_Task_Group|Disabling and Enabling Task Group]] – [[Special:MyLanguage/4_4_3_Beefalo:Tasks_by_Groups|Tasks by Groups ]] </translate>
[[Special:MyLanguage/Standard_Backup_Procedure|Standard Backup Procedure]] – [[Special:MyLanguage/4_4_3_Beefalo:Task_Name_Template_–_Backup|Task Name Template – Backup]] –[[Special:MyLanguage/4_4_3_Grolar:Disabling_and_Enabling_Task_Group|Disabling and Enabling Task Group]] – [[Special:MyLanguage/4_4_3_Beefalo:Tasks_by_Groups|Tasks by Groups ]] </translate>

Revision as of 17:53, 11 June 2021

Other languages:
Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.

Template:Copyright SEP AG en

Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3/4.4.3 Beefalo V2. For previous documentation version(s), check Documentation archive.


Overview

With SEP sesam, you can back up all kinds of data in different virtual environments. But as the number of virtual servers increases - new virtual machines (VMs) are created and deleted every day in the dynamic environment - manual configuration of backup tasks becomes quite tedious and time-consuming.

To simplify the backup of multiple VMs, you can automate the process by generating tasks for each supported hypervisor and also clients for VMs to which the generated tasks are assigned and for which ACLs can be assigned. It is recommended to use these features whenever a new hypervisor is added and there are many new VMs that need to be backed up.

The Manage VM tasks option scans the hypervisor host for available VMs and allows the creation of a task group based on the selected filters. SEP sesam provides a script with functions that handle the creation and execution of tasks for VMs. The script execution can be configured to delete the tasks assigned to the non-existing VMs or to remove the group-related tasks before creating a new one.

Task creation

The following syntax is used for generating VM tasks:

sm_cmd dir -F JSON client –l 1 <client or vm server> [filter options] | sm_cmd add taskgen <task name>  -t <task type> -G <task group> -O <option> -f -

where

  • <client or vm server> is the case-sensitive name of the client or VM server as defined in the SEP sesam environment


The following options can be set:

-G <group name>             #refers to the task group and is not mandatory (unless the -O option is used) 
-g group1[,group2]          #additional groups to add tasks to
-k                          #search in the view of all VMs and uses a quick sort based on attributes Backup required=yes
-O remove_non_existing      #delete all tasks from the task group for VMs that no longer exist

-O remove_all               #delete all tasks belonging to the task group before creating new tasks
-O add_non_exiting          #create a task even if the VM no longer exists
-O remove_only              #delete all tasks for VMs not existing anymore, but do not generate new tasks
-O source_not_found              #generate tasks only if no other task in the same task group is associated to the VM
  • When a task is generated, the flag 'auto_generated' is set.
  • If a task is deleted due to the options 'remove_non_existing', 'remove_all' or 'remove_only', the associated backup data is not deleted.


Client generation

To automatically generate virtual clients for VMs with SEP sesam, the following parameters must be specified:

-n client name: If set, a client will be generated for each virtual machine passed. The following placeholders are allowed:
'_AUTO_' (use virtual machine guest host name)
'_IP_' (use the guest IP address of the virtual machine)
'_AUTO-DNS_' (resolve virtual machine guest IP address to host name)
Information sign.png Note
Placeholders only work if the required attributes, such as the host name or IP address, are available. At this time, '_AUTO-DNS_' and '_IP_' only work with VMware vSphere.
-L location for generated VM client: If the location or location tree cannot be found, it is automatically generated. If the location is not specified, the root location is used.
-w operating system of the generated virtual machine client: If set to '_AUTO_', the operating system is guessed from the virtual machine. 
Information sign.png Note
Placeholders only work if the required attributes such as guest operating system are present.

The following attributes are automatically set for the generated client:

  • Client is virtual machine
  • Access mode = VIRTUAL
  • Virtual server name is set by the client of the task.
  • Name of the virtual machine, if available.
  • Operating system, if available (default LINUX).
  • Auto_generated

Tasks are assigned to the client. In the Topology view, they are displayed twice: once under generated client and once under VM server.


Task grouping

You can add all tasks for a backup target or other tasks with similar characteristics to a task group and trigger all tasks with a single event.

  1. From Main Selection -> Tasks -> By Groups, click New Task Group. The New Task Group window opens.
  2. Enter the Group name. Under Tasks for this group, select the tasks (from the list of all available tasks on the left) and add them to your newly created task group list.
  3. If you want to start a job for the task group immediately, right-click the task group name and click Immediate Start. If you want to schedule the task group, click New Schedule under Main Selection -> Scheduling -> Schedules.
Information sign.png Note
  • A task group must always be linked to a schedule that has a corresponding event attached to it. For details on creating the whole scheduled event setup, see Standard Backup Procedure.
  • If you already have a configured schedule, you can link your task group to it by clicking the Schedules tab when you create a task group or later in the task group properties window. Once you have configured a schedule, you have to create a new event for it.

When a backup job is started for the group, the tasks on the drives will run simultaneously if possible. Other tasks are dynamically assigned to backup devices by SEP sesam. You can view the status of the entire 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

Standard Backup ProcedureTask Name Template – BackupDisabling and Enabling Task GroupTasks by Groups