|
APIs in Category: dp-restore |
API version 5.0 |
dp-restore-to-new-path |
These operations are used by Freya to restore data from a backed-up dataset. |
| dp-restore-to-new-path | [top] |
Start a restore operation on part of a dataset. This operation copies whole members or its sub-paths of the dataset from a specific backup version to a new location. The operation is performed in the background by a job.
Error conditions:
- EOBJECTNOTFOUND - The dataset name or ID or one of the member name or ID was not found.
- EACCESSDENIED - The dataset exists, but the user invoking the API has no DFM.BackupManager.Restore or DFM.BackupManager.RestoreFromSecondary permission on the dataset or on any of the members, or DFM.BackupManager.Restore on the destination host.
- EINTERNALERROR - An error occurred while processing the request. Try again later.
- EINVALIDINPUT - The number of paths to restore was either 0 or more than 1000 or neither backup-id nor backup-version was specified.
- EINVALIDHOST - One of the specified destination hosts was not a valid restore destination.
- EDATABASEERROR - A database error occured.
Input Name Range Type Description backup-id integer
optional
Identifier of the backup instance to restore from. If this parameter is specified, then backup-version is ignored.
Range: [1..2^31-1]backup-version dp-timestamp
optional
Timestamp of the backup which should be restored from. If the backup-id is not specified, this parameter is required. A backup location that matches this version will be picked to do the restore from. check-overwrite boolean
optional
If true, checks if the member to be restored overwrites existing data on the destination. This flag cannot be used if the destination host is an OSSV or an ESX server. If it is used, an error is returned. It can be set to true only if the members to be restored are files. If the restore path has any members other than files, an error is returned. If false, goes ahead with the restore job without checking for overwrites at the destination. By default, it is false. check-space-status boolean
optional
If true, checks if there is enough space on the destination to restore the member. This flag cannot be used if the destination host is an OSSV or an ESX server. If it is used, an error is returned. It can be set to true only if the members to be restored are files. If the restore path has any members other than files, an error is returned. If the flag is not specified or set to false, goes ahead with the restore job without checking the space status at the destination. By default, it is false. dataset-name-or-id obj-name-or-id
Name or identifier of the dataset to restore part of. members dp-recover-member-info[]
List of members and their path to recover within the dataset. Each member includes the new location to restore the data. The maximum number of members is 1000. migrate-relationship boolean
validate
optional
Flag indicating whether to migrate the relationships. By default, the value is false. Output Name Range Type Description job-id integer
optional
Id of the job that handles the restore operation. It is returned only if "check-overwrite" and "check-space-status" are false. If either of them is set to true, the API only checks overwrites and/or space status and returns. The restore operation is not performed .
Range: [1..2^31-1]overwrite-results overwrite-result[]
optional
Results of a check-overwrite. Each result will have information about the file that overwrites data on the destination. Returned if check-overwrite is true and if the file being restored might overwrite existing data. This element is not returned if there are no overwrites. space-status-results space-status-result[]
optional
Results of check-space-status. Each result will have information about the destination volume. Returned if check-space-status is true and if the destination volume does not have enough space for enough space for the restore. Returned if check-space-status is true and if the destination volume does not have enough space for the restore. If the destination volume has enough space, this element is not returned.
Errno Description EOBJECTNOTFOUND EACCESSDENIED EINTERNALERROR EINVALIDINPUT EINVALIDHOST EDATABASEERROR EBACKUPLOCATIONDOESNOTEXIST EOPERATIONNOTSUPPORTED
| dp-restore-to-primary | [top] |
Start a restore operation on part of a dataset. This operation copies files and/or directories from a specific backup version back to the primary location. The operation is performed in the background by a job.
Error conditions:
- EOBJECTNOTFOUND - The dataset name or ID or one of the member name or ID was not found.
- EACCESSDENIED - The dataset exists, but the user invoking the API has no DFM.BackupManager.Restore or DFM.BackupManager.RestoreFromSecondary permission on the dataset or on any of the members.
- EINTERNALERROR - An error occurred while processing the request. Try again later.
- EINVALIDINPUT - The number of paths to restore was either 0 or more than 1000 or neither backup-id nor backup-version was specified.
- EDATABASEERROR - A database error occured.
- ENDRESTORENOTPOSSIBLE - A partial qtree restore is requested for a dataset which requires a non disruptive restore.
Input Name Range Type Description backup-id integer
optional
validate
Identifier of the backup instance to restore from. If this parameter is specified, then backup-version is ignored.
Range: [1..2^31-1]backup-version dp-timestamp
optional
Timestamp of the backup which should be restored from. If the backup-id is not specified, this parameter is required. A backup location that matches this version will be picked to do the restore from. check-overwrite boolean
optional
If true, checks if the member to be restored overwrites existing data on the destination. This flag cannot be used if the destination host is an OSSV or an ESX server. If it is used, an error is returned. It can be set to true only if the members to be restored are files. If the restore path has any members other than files, an error is returned. If false, goes ahead with the restore job without checking for overwrites at the destination. By default, it is false. check-space-status boolean
optional
If true, checks if there is enough space on the destination to restore the member. This flag cannot be used if the destination host is an OSSV or an ESX server. If it is used, an error is returned. It can be set to true only if the members to be restored are files. If the restore path has any members other than files, an error is returned. If the flag is not specified or set to false, goes ahead with the restore job without checking the space status at the destination. By default, it is false. dataset-name-or-id obj-name-or-id
Name or ID of the dataset to restore part of. paths dp-path-info[]
List of paths to restore within the dataset. Each path can be a single file or a directory. The maximum number of paths is 1000. Output Name Range Type Description job-id integer
optional
Id of the job that handles the restore operation. It is returned only if "check-overwrite" and "check-space-status" are false. If either of them is set to true, the API only checks overwrites and/or space status and returns. The restore operation is not performed .
Range: [1..2^31-1]overwrite-results overwrite-result[]
optional
Results of a check-overwrite. Each result will have information about the file that overwrites data on the destination. Returned if check-overwrite is true and if the file being restored might overwrite existing data. This element is not returned if there are no overwrites. space-status-results space-status-result[]
optional
Results of check-space-status. Each result will have information about the destination volume. Returned if check-space-status is true and if the destination volume does not have enough space for enough space for the restore. Returned if check-space-status is true and if the destination volume does not have enough space for the restore. If the destination volume has enough space, this element is not returned.
Errno Description EOBJECTNOTFOUND EACCESSDENIED EINTERNALERROR EINVALIDINPUT EDATABASEERROR ENDRESTORENOTPOSSIBLE EBACKUPLOCATIONDOESNOTEXIST EOPERATIONNOTSUPPORTED
| dp-restore-vi-start | [top] |
Start an operation to restore one or more objects in the virtual infrastructure. This API cannot be used to restore an entire dataset.
Error conditions:
- EOBJECTNOTFOUND - The object name or ID was not found.
- EACCESSDENIED - The object exists, but the user invoking the API has no DFM.BackupManager.Restore or DFM.BackupManager.RestoreFromSecondary permission on the object.
- EAPPOBJECTNOTFOUNDINBACKUP - The object does not exist in the backup from which the user is attempting to restore.
- EAPPOBJECTNOTRESTORABLE - The object exists in the backup, but is not restorable.
- EINTERNALERROR - An error occurred while processing the request. Try again later.
- EINVALIDINPUT - The number of objects to restore was either 0 or more than 1000 or input parameters were either missing or incorrectly specified.
- EDATABASEERROR - A database error occurred.
Input Name Range Type Description backup-id integer
Identifier of the backup instance to restore from.
Range: [1..2^31-1]dp-vi-restore-objects dp-vi-restore-object[]
List of objects to restore as well as per object restore settings. dp-vi-restore-settings dp-vi-restore-settings
optional
Operation level settings for the restore operation. If these settings are not provided, plugins will use their own default settings. Output Name Range Type Description job-id integer
Id of the job that handles the restore operation for virtual objects.
Range: [1..2^31-1]
Errno Description EOBJECTNOTFOUND EACCESSDENIED EOBJECTNOTFOUNDINBACKUP EOBJECTNOTRESTORABLE EINTERNALERROR EINVALIDINPUT EDATABASEERROR
| Element definition: dp-path-info | [top] |
Information about a path inside a dataset.
Name Range Type Description member-name-or-id obj-name-or-id
Name or id of the dataset component that is at the root of the file tree. This may be qtree, ossv directory or volume id that is source of the physical data protection relationship. path string
Name of the path. The maximum path length is 32767 characters. This path is relative to "member-name-or-id" path in the storage system or OSSV host. Path cannot be empty. primary-snapshot-name string
optional
Name of the Snapshot copy on the primary where the data being restored originated. This is ignored if primary-snapshot-unique-id is specified. primary-snapshot-unique-id string
optional
Unique id of the Snapshot copy on the primary where the data being restored originated. Currently, this is the Snapshot copy's creation time. This is used to differentiate between multiple copies of the root object (specified by member-name-or-id input) in the same backup. If not specified and different versions of the root object exist in two Snapshot copies in the backup, then the restore might be ambiguous. restore-configuration boolean
optional
Valid only when an OSSV directory being restored is a Virtual Machine. If false the configuration of the Virtual Machine is not changed, only disks are restored. If true, the configuration and data are restored. Default value is true.
| Element definition: dp-recover-member-info | [top] |
Information about a member inside a dataset.
Name Range Type Description destination-host obj-name-or-id
Host to restore this dataset member to. The destination host must be compatible with the member type of the member being restored. For example, if the member is a volume, then this destination host must be a storage system. destination-path string
optional
Path to restore this dataset member to. The path will be interpreted relative to destination-host.
If the destination host is a storage system, the path must not already exist. If the destination host is an OSSV, the path will be overwritten. In case of a Virtual Machine restore to the original location:The path must either be an empty string or not be specified. The restore will happen through the destination host.
The format of this value depends on the host type of destination-host. If destination-host is a storage system, then it should be of the form "/vol1/[qtree1][/dir1..]". If a full volume restore is being specified, then the destination path must be a volume "/vol". If a full qtree restore is specified, and if the destination is a storage system, destination path can be either "/vol" or "/vol/qtree" and if it is "/vol", the server automatically appends the qtree name to the destination path to turn it into "/vol/qtree" format. If destination-host is an OSSV host, then it should be a pathname appropriate for the OSSV host. A Windows host will accept paths such as "C:\My Documents" and a UNIX host will accepts paths such as "/home/user".If the specified dataset-name-or-id is of an application data set, all the above rules apply. In addition, the files will be restored under a uniquely named directory under the destination path. The directory name is created by adding together three separate pieces of information (listed below) separated by a "_" character:
- Name of the primary Snapshot where data originated. All characters except [A-Z], [a-z], [0-9], '.', '-', '_', ')' and '(' are stripped from the Snapshot name and the name is trimmed to the first 42 characters before it is used. The 42 character limit ensures that the total length of the uniquely named directory does not exceed 64 characters.
- The DFM identifier of the primary qtree where the data originated.
- The DFM identifier of the Snapshot. This is currently the timestamp when the Snapshot was created.
The maximum destination length is 32767 characters. In some cases, shorter destination lengths will fail due to limitations of underlying storage systems. Default value is an empty string.destination-path-skip-extra-directory boolean
optional
If this input is specified and is true, no extra directory will be added to the destination path. See destination-path for more information on how an extra directory is added to the destination path for an application dataset. If the dataset is not an applicatoin dataset, this input has no effect. Default is false. member-name-or-id obj-name-or-id
Name or identifier of the dataset component that is at the root of the file tree. This may be qtree, ossv directory or volume id that is source of the physical data protection relationship. path string
Name of the path. The maximum path length is 32767 characters. This path is relative to "member-name-or-id" path in the storage system or OSSV host. Path cannot be empty. "/" is considered as full member restore when the member is a volume, qtree or OSSV directory. primary-snapshot-name string
optional
Name of the Snapshot copy on the primary where the data being restored originated. This is ignored if primary-snapshot-unique-id is specified. primary-snapshot-unique-id string
optional
Unique id of the Snapshot copy on the primary where the data being restored originated. Currently, this is the Snapshot copy's creation time. This is used to differentiate between multiple copies of the root object (specified by member-name-or-id input) in the same backup. If not specified and different versions of the root object exist in two Snapshot copies in the backup, then the restore might be ambiguous. restore-configuration boolean
optional
Valid only when an OSSV directory being restored is a Virtual Machine. If false the configuration of the Virtual Machine is not changed, only disks are restored. If true, the configuration and data are restored. Default value is true.
| Element definition: dp-timestamp | [top] |
Seconds since 1/1/1970 in UTC. Range: [0..2^31-1]. This runs out in 2036, so update the API some time before then.
[none]
| Element definition: dp-vi-restore-object | [top] |
A list of virtual objects to be restored, and per object settings for this restore operation.
Name Range Type Description dp-vi-object-restore-settings dp-vi-object-restore-settings
optional
Object level settings for individual virtual objects that need to be restored. restore-object-name-or-id obj-name-or-id
Name or ID of the virtual object to restore. The object must be present in the specified backup and must be restorable. If the object is not restorable, error EOBJECTNOTRESTORABLE will be returned.
| Element definition: dp-vi-restore-settings | [top] |
Various settings for the operation to restore the virtualization objects.
Name Range Type Description dp-vi-hyperv-restore-settings dp-vi-hyperv-restore-settings
optional
Operation level settings for restoring Hyper-V objects. dp-vi-vmware-restore-settings dp-vi-vmware-restore-settings
optional
Operation level settings for restoring VMware objects. restore-script string
optional
Name of the script to be invoked on the Host Services station both before and after the restore. The restore-script consists of 0 to 255 characters. The default value of this property is the empty string "".
An empty string value "" indicates no script is invoked. The system does not check whether a non-empty path string actually refers to an executable script prior to attempting to run the script. For example, %env%\scripts\restore.ps1 OR c:\program..\HS\scripts\restore.ps1 OR k:\program..\HS\scripts\restore.ps1 [k is a network share] OR UNC path \\SCRIPTSSVR\share\scripts\restore.ps
| Element definition: obj-name-or-id | [top] |
Name or internal ID of a DFM object. This typedef is an alias for the builtin ZAPI type string. An obj-name-or-id must contain between 1 and 64 characters, and must conform to one of the following formats: Elements of type obj-name-or-id are used only as inputs to ZAPIs. The value must match either the name or internal ID of an existing DFM object. The ZAPI must specify the object's DFM object type (e.g. dataset, host, DP policy, etc.). Some ZAPIs allow the object to be one of several different types.
- It must have the format of an obj-name, or
- It must be the decimal numeric string form of a positive integer whose value is in the range [1..2^31 - 1].
- In case of application resources from the Host Service, this field can contain unique identifier assigned to the object by the Host Service e.g. for a Virtual Machine, it can be a GUID of the VM. One exception is when such unique identifier is a decimal numeric string containing only digits from 0 through 9. In that case, you cannot use such identifier as obj-name-or-id input.
If the format of an obj-name-or-id input element does not conform, or the value does not match the name or ID of an existing object, then generally the ZAPI documents that it fails with error code EOBJECTNOTFOUND. A ZAPI may return more specific error codes. In such cases, the ZAPI specification must document its behavior.
If a ZAPI can accept a null value (e.g. reference to no object at all) for such an element, then the element is declared optional, and the absence of the input element represents a null value.
[none]
| Element definition: overwrite-result | [top] |
Information about the member and the destination.
Name Range Type Description dest-host string
Destination host where file will be restored.. file-path string
destination path where the file was being restored. The path includes the name of the file being restored. overwrite-status string
For ONTAP version below 7.3.0, we cannot check for overwrite. In that case, this element will return a predefined string indicating overwrite status could not be checked. For other cases, the overwrite status will be returned. Possible values : "overwrite", "overwrite_check_unsupported"
| Element definition: space-status-result | [top] |
Information about the destination volume which does not have enough space for the restore
Name Range Type Description avail-space integer
Free space available in the volume in KB.
Range: [0..2^64-1]dest-host string
Name of the destination host where the restore would take place. dest-vol string
Name of the destination volume where the restore would take place. req-space integer
Space required in the volume for restore in KB.
Range: [0..2^64-1]
| Element definition: dp-vi-hyperv-restore-settings | [top] |
Hyper-V specific restore settings.
Name Range Type Description start-vm-after-restore boolean
optional
Bring the VM online after restore. This option is applicable only when restoring a VM and will be ignored otherwise. If this input is not specified, it will default to false.
| Element definition: dp-vi-object-restore-settings | [top] |
Various settings for a virtual object to be restored.
Name Range Type Description dp-vi-vmware-object-restore-settings dp-vi-vmware-object-restore-settings
optional
Object level settings for individual VMware objects.
| Element definition: dp-vi-vmware-restore-settings | [top] |
VMware specific restore settings.
Name Range Type Description esx-server-name-or-id obj-name-or-id
optional
Name or ID of the ESX server to mount the backup to during restore. If this input is not specified, it will not be sent to the VMWare plugin, and it is up to the discretion of the plugin to choose its behavior. start-vm-after-restore boolean
optional
Bring the VM online after restore. This option is applicable only when restoring a VM and will be ignored otherwise. If this input is not specified, it will default to false.
| Element definition: obj-name-or-id | [top] |
Name or internal ID of a DFM object. This typedef is an alias for the builtin ZAPI type string. An obj-name-or-id must contain between 1 and 64 characters, and must conform to one of the following formats: Elements of type obj-name-or-id are used only as inputs to ZAPIs. The value must match either the name or internal ID of an existing DFM object. The ZAPI must specify the object's DFM object type (e.g. dataset, host, DP policy, etc.). Some ZAPIs allow the object to be one of several different types.
- It must have the format of an obj-name, or
- It must be the decimal numeric string form of a positive integer whose value is in the range [1..2^31 - 1].
- In case of application resources from the Host Service, this field can contain unique identifier assigned to the object by the Host Service e.g. for a Virtual Machine, it can be a GUID of the VM. One exception is when such unique identifier is a decimal numeric string containing only digits from 0 through 9. In that case, you cannot use such identifier as obj-name-or-id input.
If the format of an obj-name-or-id input element does not conform, or the value does not match the name or ID of an existing object, then generally the ZAPI documents that it fails with error code EOBJECTNOTFOUND. A ZAPI may return more specific error codes. In such cases, the ZAPI specification must document its behavior.
If a ZAPI can accept a null value (e.g. reference to no object at all) for such an element, then the element is declared optional, and the absence of the input element represents a null value.
[none]
| Element definition: dp-vi-vmware-object-restore-settings | [top] |
Various settings for a VMWare object to be restored.
Name Range Type Description destination-datastore-name-or-id obj-name-or-id
optional
Name of the datastore to restore the object to. This option is valid only when object being restored is a VMDK. If unspecified, it will default to original datastore associated with the VMDK.
| Element definition: obj-name-or-id | [top] |
Name or internal ID of a DFM object. This typedef is an alias for the builtin ZAPI type string. An obj-name-or-id must contain between 1 and 64 characters, and must conform to one of the following formats: Elements of type obj-name-or-id are used only as inputs to ZAPIs. The value must match either the name or internal ID of an existing DFM object. The ZAPI must specify the object's DFM object type (e.g. dataset, host, DP policy, etc.). Some ZAPIs allow the object to be one of several different types.
- It must have the format of an obj-name, or
- It must be the decimal numeric string form of a positive integer whose value is in the range [1..2^31 - 1].
- In case of application resources from the Host Service, this field can contain unique identifier assigned to the object by the Host Service e.g. for a Virtual Machine, it can be a GUID of the VM. One exception is when such unique identifier is a decimal numeric string containing only digits from 0 through 9. In that case, you cannot use such identifier as obj-name-or-id input.
If the format of an obj-name-or-id input element does not conform, or the value does not match the name or ID of an existing object, then generally the ZAPI documents that it fails with error code EOBJECTNOTFOUND. A ZAPI may return more specific error codes. In such cases, the ZAPI specification must document its behavior.
If a ZAPI can accept a null value (e.g. reference to no object at all) for such an element, then the element is declared optional, and the absence of the input element represents a null value.
[none]