> For the complete documentation index, see [llms.txt](https://docs.trilio.io/kubernetes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trilio.io/kubernetes/concepts/file-level-recovery-for-virtual-machines/download-files-from-the-recovery-vm.md).

# Download Files from the Recovery VM

A step-by-step guide on downloading files from the Recovery VM using SCP or WinSCP, either to a local system or directly to the original VM, ensuring secure file recovery.

## Accessing backed-up VM data from the Recovery VM.

This is how Trilio generates the SSH command on the UI.

<figure><img src="https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-ed88be79db61032f3ada87eee38293fea6a12954%2Fimage%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

Files from the Recovery VM can be downloaded either locally or directly to the original VM using the SCP command or the WinSCP tool.

### Follow the steps below for each method:

#### 1. **Download Files Locally Using SCP:**

* Run the following command to securely copy files:

  ```sh
  scp -P <port-number> -i <private-key-path> sshuser@<ip-addr>:<file-path> <dest-path>
  ```
* Replace the placeholders with the details provided by Trilio in the UI:
  * `<port-number>` and `<ip-addr>`: Information provided by Trilio in the SSH command provided in the UI.
  * `<private-key-path>`: Path to the private key generated in the [prerequisites](/kubernetes/concepts/file-level-recovery-for-virtual-machines/file-level-recovery-for-virtualmachine-backups.md#prerequisites) section.
  * `<file-path>`: The file path on the Recovery VM Manager.
  * `<dest-path>`: The local destination path where you want to save the file.

#### 2. **Download Files Locally Using WinSCP:**

* Follow these steps to transfer files using WinSCP:
  1. **Enter Connection Details:**

     * **Hostname:** Enter the service IP address from the SSH command provided in the Trilio UI.
     * **Port:** Enter the port number specified in the UI.
     * **Username:** Use the username provided in the SSH command.
     * **Private Key:** Navigate to **Advanced → SSH → Authentication** and select the private key generated during the [prerequisites](/kubernetes/concepts/file-level-recovery-for-virtual-machines/file-level-recovery-for-virtualmachine-backups.md#prerequisites).

     **WinSCP Inputs:**

     ![WinSCP Inputs](https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-73a7d1ec3728971b6212335cf61864c251a4414e%2FWinSCP-Inputs%20\(1\).png?alt=media)

     **WinSCP PrivateKey Selection:**

     ![WinSCP PrivateKey Selection](https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-535a9bff6d6f0965287519b3482510899b618a31%2FWinSCP-private-key-selection%20\(1\).png?alt=media)
  2. **Login to the SSH-Enabled Server:**

     * After logging in, navigate through the directories in the WinSCP interface.
     * Find the VM backup files at the path specified by Trilio in the UI.

     ![Backed-up VM Data](https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-3fd4b8fb2da15c2a20c9494dbe73b88ccf60b74d%2FRecovery-VM-Manager-Data%20\(1\).png?alt=media)
  3. **Download Files:**

     * Select the files you want to download, right-click, and choose **Download** to save them locally.

     **Download Files:**

     ![WinSCP Download File](https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-1d6ad1e6bc4281501fe3303ec80431b35823ac5a%2FWinSCP-Download-File%20\(1\).png?alt=media)

#### 3. **Transfer Files Directly to the Original VM Using SCP:**

* To download files directly to the original VM, first SSH into the original VM.
* Then follow the same steps outlined in [**Download Files Locally Using SCP**](https://docs.trilio.io/kubernetes/t4k-concepts/file-level-recovery-for-virtual-machines/download-files-from-the-recovery-vm#id-1.-download-files-locally-using-scp).

#### 4. **Transfer Files Directly to the Original VM Using WinSCP:**

* Establish two separate sessions in WinSCP: one for the Recovery VM and the other for the original VM.
* In the Recovery VM session, locate the desired files, right-click, and select **Copy**.

  ![WinSCP Copy File From RecoveryVM Manager](https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-b4fac8b17168c51d995414bb54fe9f09fa76233f%2FWinSCP-COPY-Remote-File%20\(1\).png?alt=media)
* Switch to the original VM session, navigate to the target directory, right-click, and choose **Paste** to save the files.

  ![WinSCP Paste File From RecoveryVM Manager](https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-a771cb61d2ae0bb2bf35c47d6524cc52ad607356%2FWinSCP-Paste-to-Original-VM%20\(1\).png?alt=media)
