File Level Recovery

Important:  This document is being phased out and does not contain up-to-date information. For updated API documentation for Zerto versions 9.5 and later, see ZVM REST API - Swagger.

You can also access Swagger from the ZVM: click the menu button () on the top right and select APIs or navigate to https://<ZVM IP>:9669/swagger/index.html in a Windows ZVM or https://<ZVM IP>/management/api/swagger/index.html in ZVM Appliance.

The File Level Recovery APIs enables you to view and recover specific files and folders from the recovery site from a specific point in time. You can recover the files and folders from a short-term restore point of time specified in the Journal, or from a Extended Journal restore point specified in the Repository if you have associated a Repository with the virtual protection group containing the virtual machine.

The user must be an administrator with viewing and managing VPG privileges.

ZCM users must have the File level restore operator role, or a role that includes the permissions: Perform file level restore - Download and Perform file level restore - Restore to original location.

The following APIs are available:

Create a New Mount

View Existing Sessions

Browse The Disk

Select and Download Items

Unmount a Disk

Create a New Mount

Mount a virtual machine.

Method URL
POST https://zvm_ip:port/v1/flrs

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.

Request Body Using Json Format

The following is an example of a Json request body for https://zvm_ip:port/v1/flrs. This request recovers files and folders from a short-term restore point of time specified in the Journal.

{
  "jflr": {
    "CheckpointIdentifier": "6",
    "VmIdentifier": "0a1d772d-0f69-4a0e-8063-f809aa9dc237.vm-70",
    "VpgIdentifier": "b797d92a-a65a-4e00-9410-1a3aff93480b"
  }
}

Parameter Description Type Mandatory
jflr Details about the File Level Recovery session. - -

CheckpointIdentifier

The identifier of the checkpoint of the VPG. string Yes

VmIdentifier

The identifier of the virtual machine. string Yes

VpgIdentifier

The internal VPG identifier string Yes

The following is an example of a Json request body for https://zvm_ip:port/v1/flrs. This request recovers files and folders from a Extended Journal restore point specified in the Repository if you have associated a Repository with the virtual protection group containing the virtual machine.

{
  "bflr": {
    "VpgIdentifier": "b797d92a-a65a-4e00-9410-1a3aff93480b",
    "VmIdentifier": "0a1d772d-0f69-4a0e-8063-f809aa9dc237.vm-70",
    "retentionSetIdentifier": "eb0ea81e-d465-4cf8-baff-752ccb0ccad7",
    "repositoryIdentifier": "e9d90ca5-2abf-4325-843c-b80f8744f34e",
    "repositorySiteIdentifier": "fa8f3a43-bd74-4607-bc93-a03320e4787a"
  }
}

Parameter Description Type Mandatory
bflr Details about the File Level Recovery session. - -

VpgIdentifier

The internal VPG identifier string Yes

VmIdentifier

The identifier of the virtual machine. string Yes

retentionSetIdentifier

The identifier of the retention set of the VPG. string Yes

repositoryIdentifier

The identifier of the repository containing the retention set. string Yes

repositorySiteIdentifier

The site identifier connected to the repository. string Yes

Response In Json Format

The following is an example of a Json request body for https://zvm_ip:port/v1/flrs. This request recovers files and folders from a Extended Journal restore point specified in the Repository if you have associated a Repository with the virtual protection group containing the virtual machine.

{
"2c1320bd-9210-4fbb-9b9a-b2c08e24699e.6b5b30d6-c090-4233-8466-5fe"
}

Parameter Description
FlrSessionIdentifier The File Level Recovery session identifier.

Back to File Level Recovery

Back to All APIs

View Existing Sessions

Retrieve a list of mounted virtual machines. There are several options to retrieve mounted virtual machines:

Retrieve All Mounted Virtual Machines.
Retrieve All Mounted Disks of a VM
Retrieve a Single Mounted Disk.

Retrieve All Mounted Virtual Machines

Method URL
GET https://zvm_ip:port/v1/flrs

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.

Retrieve All Mounted Disks of a VM

Method URL
GET https://zvm_ip:port/v1/flrs?vmIdentifier={vmIdentifier}

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
vmIdentifier The identifier of the VM. If the VM identifier is excluded, all open File Level Recovery sessions are displayed.

Retrieve a Single Mounted Disk

Method URL
GET https://zvm_ip:port/v1/flrs/{flrSessionIdentifier}

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
flrSessionIdentifier The identifier of the File Level Recovery session.

Request Body Using Json Format

The request body is empty.

Response In Json Format

The following is an example of a Json response for:

All mounted disks: https://zvm_ip:port/v1/flrs
All disks of a VM: https://zvm_ip:port/v1/flrs?vmIdentifier={vmIdentifier}
A single disk (without the array statement): https://zvm_ip:port/v1/flrs/{flrSessionIdetifier}

[
  {
    "CheckpointIdentifier": "6",
    "FlrSessionIdentifier": "2c120bd-9210-4fbb-9b9a-b2c08e24699e.6b30d6-c090-4233-84e18bf39a4c",
    "FlrSessionStatus": "MountCompletedSuccessfully",
    "FlrSessionType": "jflr",
    "MountTime": "2018-03-04T12:24:41.551Z",
    "VmIdentifier": "0a1d772d-0f69-4a0e-8063-f809aa9dc237.vm-70",
    "VpgIdentifier": "b797d92a-a65a-4e00-9410-1a3aff93480b"
  }
]

Parameter Description
CheckpointIdentifier The identifier of the checkpoint of the VPG.
FlrSessionIdentifier The File Level Recovery session identifier.
FlrSessionStatus The status of the request to mount.

Possible values are:
MountCompletedSuccessfully: Mounting the disk completed successfully.
MountFailed: Mounting the disk failed.
MountInProgress: Mounting a new disk is in progress.
UnmountCompletedSuccessfully: Unmounting the disk completed successfully.
UnmountFailed: Unmount the disk failed.
UnmountInProgress: Unmounting the disk is in progress.
FlrSessionType The File Level Recovery session type: jflr.

MountTime The date and time when the mount was created, in the format yyyy-mm-ddThh:mm:ss.fffZ, set to UTC.
VmIdentifier The internal identifier of the VM.
VpgIdentifier The internal identifier of the VPG.

Back to File Level Recovery

Back to All APIs

Browse The Disk

Retrieve a list of files or folders existing in a disk.

The information can be retrieved for one path at a time.

Method URL
POST https://zvm_ip:port/v1/flrs/{flrsessionIdentifier}/browse

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
flrsessionIdentifier The File Level Recovery session identifier.

Request Body Using Json Format

The following is an example of a Json request body for https://zvm_ip:port/v1/flrs/{flrsessionIdentifier}/browse.

{
  "path": "partition#1 Ext3"
}

Parameter Description Type Mandatory
Path The path to a partition, folder or file.

An empty Path value returns all existing partitions in the disk.

Use a single forward slash (/) to separate the components of a path. For example:
ZertoVMs/dummy_vra_znest175hv02.zertolab.local/RecoveryVolumes/41b4fac2/vm44/VM-1.vhdx.

Backslash (\) is not supported.
string Yes

Response In Json Format

The following is an example of a Json response for https://zvm_ip:port/v1/flrs/{flrsessionIdentifier}/browse

{
  "MainPathItem": {
    "CreationTime": "2018-03-05T12:13:22.365Z",
    "DownloadInformation": {
      "AdditionalInformation": null,
      "IsDownloadable": true
    }
    "IsBrowsable": true,
    "LastAccessTime": "2018-03-05T12:13:22.365Z",
    "LastWriteTime": "2018-03-05T12:13:22.365Z",
    "Path": "",
    "SizeInBytes": null,
    "Type": "Partition"
  },
  "PathItems": [
  {
    "CreationTime": "2018-03-05T12:13:22.365Z",
    "DownloadInformation": {
      "AdditionalInformation": "Cannot restore. Links are not supported.",
      "IsDownloadable": false
    },
    "IsBrowsable": false,
    "LastAccessTime": "2018-03-05T12:13:22.365Z",
    "LastWriteTime": "2018-03-05T12:13:22.365Z",
    "Path": "partition#0 Ext3\\cdrom",
    "SizeInBytes": 0,
    "Type": "File"
  }]
}

Parameter Description
MainPathItem Details regarding the path mentioned in the request body.

CreationTime

The time in which the API was run, in the format yyyy-mm-ddThh:mm:ss.fffZ, set to UTC.

DownloadInformation

Details regarding downloading the partition, folder or file.

AdditionalInformation

Additional information regarding the ability to download the partition, folder or file.

IsDownloadable

True: The partition can be downloaded.
False: The partition cannot be downloaded.

IsBrowsable

True: The partition can be browsed.
False: The partition cannot be browsed.

LastAccessTime

The date and time the item was last accessed in the disk, in the format yyyy-mm-ddThh:mm:ss.fffZ, set to UTC.

LastWriteTime

The date and time the item was last edited, in the format yyyy-mm-ddThh:mm:ss.fffZ, set to UTC.

Path

The path to the partition.

When the path value in the request body is empty, the MainPathItem path is empty.

SizeInBytes

The size of the item, in bytes.

Type

The type of item.

Possible values are:
Partition
Folder
File
PathItems Details regarding the sub items of the main path item.

If the value of the path in the request body is a file, the PathItems list is empty.

If the path value in the request body is empty, PathItems displays details regarding the highest partition.

CreationTime

The time in which the API was run in the format, yyyy-mm-ddThh:mm:ss.fffZ, set to UTC.

DownloadInformation

Details regarding the download.

AdditionInformation

Additional information regarding the partition, folder or file.

IsDownloadable

True: The partition, folder or file can be downloaded.
False: The partition, folder or file cannot be downloaded.

IsBrowsable

True: The item is a folder or a partition and is browsable.
False: The item is a file, and is not browsable.

LastAccessTime

The date and time the item was last accessed in the disk, in the format yyyy-mm-ddThh:mm:ss.fffZ, set to UTC.

LastWriteTime

The date and time the item was last edited, in the format yyyy-mm-ddThh:mm:ss.fffZ, set to UTC.

Path

The path to the item.

SizeInBytes

The size of the item, in bytes.

Type

The type of item. Possible values are:
Partition
Folder
File

Back to File Level Recovery

Back to All APIs

Select and Download Items

Note the following:

Up to 20 items can be downloaded.
The items are automatically compressed if the user selects one of the following:
More than one file
A folder
Multiple folders
A partition
Method URL
POST https://zvm_ip:port/v1/flrs/{flrsessionIdentifier}/download

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
flrsessionIdentifier The File Level Recovery session identifier.

Request Body Using Json Format

The following is an example of a Json request body for https://zvm_ip:port/v1/flrs/{flrsessionIdentifier}/download.

{
  "Compress": false,
  "PathList":
  [
    "partition#0 Ext3\\initrd.img"
  ]
}

Parameter Description Type Mandatory Default
Compress Whether to compress the file.

True: Compress the file.
False: Don’t compress the file.
boolean No True
PathList The path to the file or folder that’s being downloaded.

If the PathList is empty, the entire disk is downloaded.
string Yes

-

Response In Json Format

The following is an example of a Json response for https://zvm_ip:port/v1/flr/{flrsessionIdentifier}/download

{
  "v1/downloads/6b5b30d6-c090-4233-8466-5fe18bf39a4c.9eb56867-2537-47d2-9396-3b0b8a5cd11c"
}

Parameter Description
DownloadLink The File Level Recovery session identifier.

The link is valid for 10 seconds.

Back to File Level Recovery

Back to All APIs

Restore Items to Original Location

Method URL
POST https://zvm_ip:port/v1/flrs/{flrsessionIdentifier}/Restore

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
flrsessionIdentifier The File Level Recovery session identifier.

Request Body Using Json Format

The following is an example of a Json request body for https://zvm_ip:port/v1/flrs/{flrsessionIdentifier}/Restore.


{
    "RestoreSettings": {
      "Credentials": "admin"
    },
    "PathList":
  [
    "C%3a%2fSecondVolume2",
    "C%3a%2fFirstVolume1%2fOther%2fThird",
    "C%3a%2fFirstVolume1%2fOther%2fSecond%2fCLRViaCSharp.pdf"
  ]
}

Parameter Description Type Mandatory Default
PathList The path to the file or folder that’s being restored.

If the PathList is empty, nothing will be restored.
string Yes

-

Response In Json Format

The following is an example of a Json response for https://zvm_ip:port/v1/flr/{flrsessionIdentifier}/download

"0c66b743-01d3-42c5-844b-bf5d4283ddb1.6b5b30d6-c090-4233-8466- 5fe18bf39a4c"

Parameter Description
TaskIdentifier The identifier of the task. The task identifier can be used with the Tasks API to monitor the restore action.

Back to File Level Recovery

Back to All APIs

Unmount a Disk

Unmount a previously mounted disk

Method URL
DELETE https://zvm_ip:port/v1/flrs/{flrsessionIdentifier}

Where:

zvm_ip The IP address of the Zerto Virtual Manager where the API is run.
port The port to access the Zerto Virtual Manager. The default port is 9669.
flrsessionIdentifier The File Level Recovery session identifier.

Request Body Using Json Format

The request body is empty.

Response In Json Format

The following is an example of a Json response for https://zvm_ip:port/v1/flr/{flrsessionIdentifier}.

"0c66b743-01d3-42c5-844b-bf5d4283ddb1.6b5b30d6-c090-4233-8466-5fe18bf39a4c"

Parameter Description
TaskIdentifier The identifier of the task. The task identifier can be used with the Tasks API to monitor the unmount action.

Back to File Level Recovery

Back to All APIs