Linux operating systemsWindows operating systems

Using the tagschedule option for ad hoc backup operations

If a scheduled backup operation fails, you can use the -tagschedule option to run a backup on all VMs that are associated with that schedule.
When you run a backup operation with the -tagschedule option, the backup vm command generates a list of VMs to back up. The list includes VMs for which:
  • The VM Schedule (IBM Spectrum Protect) tag value matches what was passed in via the -tagschedule option.
  • The VM Data Mover (IBM Spectrum Protect) tag value matches the data mover node name.
If both match, then that VM is selected for backup. You can also see which VMs are selected by using the -preview option.

If, for example, SCHEDULE1 ran overnight but failed, you can issue a dsmc backup vm -tagschedule=SCHEDULE1 command for a given data mover. That data mover then uses the string SCHEDULE1 to filter the VM inventory and select the VMs that have a Schedule (IBM Spectrum Protect) tag value of SCHEDULE1.

The selected VMs are also filtered to include only VMs with a Data Mover (IBM Spectrum Protect) tag value matching the node name of the data mover in use. The backup also includes any VMs that do not have a data mover tag assigned if the data mover being used is designated as the default data mover. A data mover is designated as default either with the -vmtagdefaultdatamover option specified in the opt file or passed on the command line.

Run the backup vm command on all data movers associated with a schedule if you want to include all VMs associated with that schedule. Ensure that at least one of these data movers is run as the default data mover. It is not always necessary to use the default data mover option. A schedule created by the VE GUI always sets a default. But if you run the backup vm command ad hoc, the default value will not be set unless it is explicitly specified in the data mover -optfile. By default, the configuration wizard sets the first added data mover as the default TAGschedule data mover.

Tip: The query results in the Schedule table in the Monitor Schedule panel will not reflect that a tagged schedule has run. However, the individual VM status will indicate that a backup operation occurred.

The entire SCHEDULE1 schedule is not rerun; only the machines with the Data Mover (IBM Spectrum Protect) tag set to the schedule name passed in are backed up. You must run a separate command on the other data movers to back up the VMs that are assigned to those data movers.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-TAGSCHEDule=--schedule_name--+-----------+------------------->
                                '- -preview-'   

>-- -ASNODENAME=--datacenter_name------------------------------->

>-- -OPTFILE=--datamover_option_file_name----------------------><

Parameters

-preview
Specify this parameter to preview the listing that will be obtained when the command is run with the specified filter.
-schedule_name
Specify the schedule name to run the listing that will be obtained when the schedule is run with the specified filter.
-ASNODENAME
Use this parameter in the options file to specify the name of the data center.
-OPTFILE
Use this parameter to specify the name of the options file.

Examples of backup scenarios

Command line:
dsmc backup vm -OPTFILE=dsm.MM1_DATACENTER1_DM1.opt -ASNODE=MM1_DATACENTER1 -tagschedule=SCHEDULE1

Backs up all VMs with schedule tag SCHEDULE1.

Command line:
dsmc backup vm -OPTFILE=dsm.MM1_DATACENTER1_DM1.opt -ASNODE=MM1_DATACENTER1 -tagschedule='DAILY_5AM' -preview

Lists the VMs that qualify for backup operations using the VMs that contain DAILY_5AM as their value for the Schedule (IBM Spectrum Protect) tag, and targeting the node MM1_DATACENTER1 for data mover MM1_DATACENTER1_DM1.