Csv
The csv option enables the client to use a comma-separated values (csv) file to define and apply different restore settings across a series of virtual machine restore operations.
In the specified .csv file, you can define column headings with settings that override equivalent client options. Column names are case-sensitive.
- "New Virtual Machine Name" overrides the -vmname option on restore.
- "New Datastore" overrides the -datastore option on restore.
- "New Datacenter" overrides the -datacenter option on restore.
- "New Host" overrides the -host option on restore.
- "PITDATE" overrides the -pitdate option on restore.
- "PITTIME" overrides the -pittime option on restore.
Supported clients
This option can be used with supported x86_64 Linux clients.
This option can be used with supported Windows clients. This option is not valid for Data Protection for Microsoft Hyper-V backups.
This feature is available only if the client operates as a data mover for IBM Spectrum Protect for Virtual Environments: Data Protection for VMware.
Options file
This option is valid in the client system options file (dsm.sys), or on the command line for Restore VM. It can also be included on the server in a client options set. It cannot be set in the Preferences Editor.
This option is valid in the client options file (dsm.opt) or on the command line for Restore VM. It can also be included on the server in a client options set. It cannot be set in the Preferences Editor.
Syntax
Parameters
- csvfilespec
- Using a CSV column overrides the equivalent command line option. Any equivalent option is
ignored if it is used with the restore vm -csv command.
For example, if you specify the command restore vm "restore_vm_list.csv" -csv -datacenter="Mambo 5", and the "New Datacenter" column is already specified in the CSV file, the -datacenter option is ignored.
Heading | Description | Usage |
---|---|---|
Virtual Machine Name | The name of the virtual machine to be restored. | No wildcard characters are allowed. Case-sensitive. This column is mandatory. |
New Virtual Machine Name | The name of the virtual machine that is restored. | This column uses the same syntax as the -vmname option. Optional. You can leave this column blank if you want to reuse the existing name. |
New Datastore | The new datastore to which the virtual hard disks are restored. | This column uses the same syntax as the -datastore option. Optional. You can leave this column blank if you want to reuse the existing datastore. |
New Datacenter | The new datacenter with which the virtual machine should be associated. | Uses the same syntax as the -datacenter option. Optional. You can leave this column blank if you want to reuse the existing datacenter. |
New Host | The new host to which the virtual machine will be restored. | This column uses the same syntax as the -host option. Optional. You can leave this column blank if you want to reuse the existing host. |
PITDATE | The point-in-time date from which the backup is specified. | This column uses the same syntax as the -pitdate option. Optional. You can leave this column blank to indicate the active backup should be restored. This column is required if PITTIME is specified in the CSV file. PITDATE dates should use the format set by the DATEFORMAT option. The default varies by locale in Windows. The default is DATEFORMAT 1 in Linux. |
PITTIME | The point-in-time time of day from which the backup is specified. | This column uses the same syntax as the -pittime option. Optional. You can leave this column blank to indicate you want to use the active backup or if only the PITDATE is specified. PITTIME times should use the format set by TIMEFORMAT option. The default varies by locale in Windows. The default is TIMEFORMAT 1 in Linux. |
The asterisk, *, denotes reuse of the original VM name as part of a wild-card construct for the name of a restored VM.
- <date> is replaced by the date of the restore.
- <time> is replaced by the time of the restore.
- <timestamp> is replaced by a combination of <date> and <time> outputs.
Elements can be placed in quotes: for example, VMs with commas and quotes in their names.
"Poem Repository ""A-F"" 20th Century"
Here, double quotes are used to express a quote (") character.
Examples
The following example shows how a CSV file looks when opened in a spreadsheet view:
Virtual Machine Name New Virtual Machine Name New Host New Datastore New Datacenter NOTES1 NOTES2 PITDATE PITTIME
VM1 *-DR_restore esx4.ibm.com DS_8 DC_RecoverSite1 group1
VM2 *-DR_restore esx4.ibm.com DS_8 DC_RecoverSite1 group1
VM3 *-DR_restore esx4.ibm.com DS_8 DC_RecoverSite1 group1
VM4 *-DR_restore esx5.ibm.com DS_10 DC_RecoverSite1 group2
VM5 *-DR_restore esx5.ibm.com DS_10 DC_RecoverSite1 group2
The following examples show comma-separated text files that were exported from CSV files.
Virtual Machine Name,New Virtual Machine Name,New Host,New Datastore,New Datacenter,NOTES1,NOTES2,PITDATE,PITTIME
VM1,*-DR_restore,esx4.ibm.com,DS_8,DC_RecoverSite1,group1
VM2,*-DR_restore,esx4.ibm.com,DS_8,DC_RecoverSite1,group1
VM3,*-DR_restore,esx4.ibm.com,DS_8,DC_RecoverSite1,group1
VM4,*-DR_restore,esx5.ibm.com,DS_10,DC_RecoverSite1,group2
VM5,*-DR_restore,esx5.ibm.com,DS_10,DC_RecoverSite1,group2
Virtual Machine Name,New Virtual Machine Name,New Host,New Datastore,New Datacenter,NOTES1,NOTES2,PITDATE,PITTIME
Tiny Linux VM,Tiny Linux VM -restore,,,,,,,
lucasTestVM10,* -restore,,,,,,10/03/2017,10:35 AM
big-cet-4TB,,devesx06.storage.tucson.ibm.com,,,,10/05/2017,,