# How to restore a single folder via CLI?

**URL:** https://forum.duplicati.com/t/how-to-restore-a-single-folder-via-cli/14801
**Category:** How-To
**Created:** [August 4, 2022, 3:43pm UTC](https://forum.duplicati.com/t/how-to-restore-a-single-folder-via-cli/14801 "2022-08-04T15:43:00Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![JimboJones](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@JimboJones](https://forum.duplicati.com/u/JimboJones)
#### Post date: [August 5, 2022, 2:28pm UTC](https://forum.duplicati.com/t/how-to-restore-a-single-folder-via-cli/14801/5 "2022-08-05T14:28:26Z")

</div>

Welcome to the forums StefanBrand.

Yes, if you’re running MacOS or Linux then using `duplicati-cli` is shorter to type than `mono Duplicati.CommandLine.exe` but otherwise they are the exact same.

If you ran

- `duplicati-cli restore ftp://me:example.com@ftp.example.com/target "/source/myfile.txt" --overwrite`

Your computer would actually run

- `mono Duplicati.CommandLine.exe restore ftp://me:example.com@ftp.example.com/target "/source/myfile.txt" --overwrite`

Either or works.

It should probably go without saying but `duplicati-cli` does not exist in Windows, in the case of Windows omit the `mono` prefix and change the `/` to `\`, so it would be.

- `Duplicati.CommandLine.exe restore ftp://me:example.com@ftp.example.com/target "\source\myfile.txt" --overwrite`

As a test I just renamed a folder on my desktop called `usb` to `usbStick`, this folder contains multiple files and folders. I then ran the following (yes, I’m in Windows and the backups are stored in local drive D:).

- C:\Program Files\Duplicati 2\>Duplicati.CommandLine.exe restore “D:\YourCompanyBackups” “C:\Users\Jimbo\Desktop\usb\*” Note the `*` as the last character (a wildcard as mentioned by ts678).

About 9 minutes later the `usb` folder and all of it’s contents have been recreated on my desktop as expected.

Side note, I need to look into this further but it seems if your backups are unencrypted you still need to provide a passphrase, doesn’t matter what gets typed in but something has to be typed. Possibly just using the `--passphrase` option with a blank value may prevent it but I haven’t had a chance to test it yet.

`Enter encryption passphrase:`  
`ErrorID: EmptyPassphrase`  
`Empty passphrases are not allowed `

If I type anything in for the `Enter encryption passphrase:` it accepts it and performs the restore.

Hopefully this helps get people working with the CLI, oh and one last thing, a quick reminder that CLI operations are not shown or recorded in the GUI.

---

_[View the full topic](https://forum.duplicati.com/t/how-to-restore-a-single-folder-via-cli/14801)._
