Restore Ignoring restore-path on command line

Restoring my data to another directory works fine thru web interface
However, thru command line, I am having a problem
It restores the data perfectly to the original folder, but ignores the restore-path
Tried different paths, no folder existing before restore; created folder before restore; Quotes, No Quotes; No Backslash on restore path - Nada - It just does not like me (lol)

“C:\Program Files\Duplicati 2\Duplicati.CommandLine.RecoveryTool.exe” restore “C:_DUPLICATI_BACKUP” --overwrite=True --restore-path = “C:\TEMP”

**** Sounds like I may need to format the restore path differently??? ***

Thanks for help in advance

Hello and welcome!

Can you try Duplicati.CommandLine.exe restore ... instead of the RecoveryTool? Pretty sure that’s only used in extreme cases, and it lacks some of the options found in the standard tool.

If you have to use RecoveryTool, the option you want is called --targetpath (inconsistently, I suppose).

Built-in help says:

Duplicati.RecoveryTool.exe restore <localfolder> [version] [options]

Restores all files to their respective destinations. Use --targetpath to choose another folder where the files are restored into.
Use the filters, --exclude, to perform a partial restore.
Version can be either a number, a filename or a date. If omitted the most recent backup is used.

Restoring files using the Recovery Tool gives an example that uses that.

Thank You for your help
I was having a problem with the pass phrase using the commanline.exe restore
I determined that the commandline,exe syntax is very finicky (lol)
The pass phrase was not working because the restore-path directory was not formatted correctly.

I supplied the command format for newbies like me for future reference
“C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe” restore “C:\Duplicati backup\DATA” “*.dat” --overwrite=True --restore-path=C:\TEMP\ --passphrase=“BACKUPpass”

What I have learned is the following ==>

  1. –restore-path=C:\TEMP\ no quotes around path
  2. No space around = on options
  3. It appears that If a option fails (like in this case the restore-path) the options that follow it are ignored

Thanks again, hope this helps others… and away it restores

Great! Glad you figured out your issue.

If your password has one or more percent characters, they may need to be doubled up to prevent CMD from trying to handle them as environment variable expansions.

Windows Command Prompt needs a double backslash if you want a backslash before the closing quote, otherwise it thinks you wanted to produce a literal double quote and then keep on going with current thing. That would cause the rest of the line to get extremely confused about what was an option name vs. value.

Alternatively, leaving off the trailing backslash would probably work fine here, but maybe not in some filters.

You still must be careful about extraneous spaces. Use quotes to keep things together, space to separate.
When trying to match a GUI job, run Export As Command-line and Duplicati will do needed quotes for you.

Thanks so much for advice
Syntax can be a royal pain in the a…