--file-to-restore overwrites a target directory with a file
There are similar issues: https://bugs.launchpad.net/duplicity/+bug/577342 https://bugs.launchpad.net/duplicity/+bug/1592184
Summary
Using duplicity -t 2022-02-06 --file-to-restore "path/in_Archive/FileName.txt" file:///backup/home/ /home/_extracted/ will cause the existing directory to be removed and the FileName.txt is written into /home/_extracted FILE!
This is pretty dangerous - as reported in launchpad restore to / will cause the whole system to be wiped. One would expect the file FileName.txt to be written into an existing diretory.
When duplicity -t 2022-02-06 --file-to-restore "path/in_Archive/" file:///var/backup/home/ /home/_extracted/ is used the duplicity complains the target directory exists - which is more or less OK.
Environment
(OS and Version) debian 10
(duplicity --version) duplicity 0.7.18.2
Possible fixes
When the target is a directory and it exists do not overwrite it also in case just a single file is restored.