Could not find a part of the path

Was just doin’ a test restore and stumbled on this. Read the corresponding posts, but I think it’s sth simpler in this case.

I could restore files from this original directory just fine:
e:\Virtual Machines\Win 11 (fresh)

But not from:
e:\Filme & Dokus\Filme\

I guess Duplicati gets confused by the ampersand “&”?

One or more errors occurred. (Could not find a part of the path '\\?\e:\E\Filme & Dokus\Filme\Kreutzer_kommt_HQ.mp4'.)

Can you confirm?

Duplicati - 2.1.0.102_canary_2024-12-12
Duplicati - 2.1.0.103_canary_2024-12-21

As it appears e:\ is a mounted share, can you give more details on the underlying mount, such as the operating system where the share exists as well as the os where Duplicati is running.

A quick test backing up from File Source to Webdav backend and restoring with folders containing & as part of the path worked fine, the escaping on the path is intriguing. Did you replace the servername/ip to ? for privacy or was this the actual output?

Hm, interesting, but why do you think so?
And nope e:\ is just a partition on my ssd

Targets are either…
… local network share \\nas-name\sth
… Pcloud
… Backblaze B2

Error is the same though.

\\?\e:\

At first glance this seemed to me as part of a network mapped resource somehow mangled. It was a hypothesis to narrow it down, but not the case.

If you are on linux, this could help to check if there is no encoding issues on the directory name itself.

ls -d "e:\Filme & Dokus\Filme" | hexdump -C

Just to complete, source OS is Win11Pro, and targets as mentioned above multiple.

After your hint I also created a test-task with target on the same drive instead of network but no change.

File path formats on Windows systems
DOS device paths
Path normalization
Trim characters
Skip normalization

Unless the path starts exactly with \\?\ (note the use of the canonical backslash), it is normalized.

and this results in paths that are different getting seen as the same, confusing Duplicati…
I’m not sure, though, why it did \\?\e:\E\. Might it be thinking that drive letters are A-Z?

1 Like

@ts678 I’m not sure I understand what you’re hinting at. Can I test anything?

All I can say:

  • Source-Drive-letter is e:
  • Backup-Target: d:\test
  • Did now a test-restore to d:\testrestore to exclude problems with source and destination being the same drive-letter but…

One or more errors occurred. (Could not find a part of the path '\\?\d:\testrestore\E\Filme & Dokus\Filme\Kreutzer_kommt_HQ.mp4'.)

You’re not the intended audience. I was responding to @marceloduplicati about URL format.
Basically don’t worry if you see things with that start, because the code does it deliberately…

What bothers me is seeing e or E twice. I suppose you could see if uppercase E: does better, however your latest test looks like the E after testrestore came in out of nowhere? Quite odd.

I have no comment for the developers besides some history about the DOS device path use.

This I guess, then we’ll know if it’s an old bug or a new:

One or more errors occurred. (Could not find a part of the path ‘\?\e:\E\Filme & Dokus\Filme\Kreutzer_kommt_HQ.mp4’.)

Its worth noting that odd E was also present in the original error message, not only on the latest test.

Did you make it minimal, e.g. no Advanced options (including Settings Default options), tiny file, etc.? I’ve been running that both on C: Source and with Source on a USB drive that landed at F:.

I’m testing restore of both the “Filme & Dokus” folder and the single (faked) .mp4 file in “Filme”. Getting lowercase f: took a manual edit, but still worked. I’m using Edge browser, if it matters…

Is this a GUI restore directly to a localhost address, or are there proxies that may be interfering?

I’m also a bit puzzled how you get lowercase drive letters. My GUI offers them up as uppercase, however for me it doesn’t seem to matter. Works either way.

Sorry, for the confusion. In my first post I had given the restore destination as folder “E” which I found confusing also :slight_smile:

Therefore the last test setup:

  • Source-Drive-letter is e:
  • Backup-Target: d:\test
  • Did now a test-restore to d:\testrestore to exclude problems with source and destination being the same drive-letter but…

One or more errors occurred. (Could not find a part of the path '\\?\d:\testrestore\E\Filme & Dokus\Filme\Kreutzer_kommt_HQ.mp4'.)

Excellent hint :+1: Seems to be a bug with the new Restore routine.
When enabling legacy the restore works, with only this warning (which seems ok):

Warning: 2024-12-26 11:22:40 +01 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-CreateMissingFolder]: Creating missing folder d:\testrestore\E\Filme & Dokus\Filme for file d:\testrestore\E\Filme & Dokus\Filme\Kreutzer_kommt_HQ.mp4

Arh, so the problem is that the folder is not being restored (due to filters, sources, etc) and this causes the restore to fail restoring the file. The previous code would handle that with a warning and create the folder before creating the file.

@carljohnsen I guess this should be an easy fix?

I’m still looking for @Ralf answers to my two previous posts because I still can’t repro the issue. Anyone else who can do it, I think this may need more details, and ideally some exact test steps.

New code has some ability to create folders. Normally a GUI backup seems to checkmark higher folders. I used a CLI backup to give a deeper folder, basically giving no DB record of the highest.

Also visible with list command:

Listing contents 0 (12/26/2024 1:44:23 PM):
f:\Filme & Dokus\Filme\ 
f:\Filme & Dokus\Filme\Kreutzer_kommt_HQ.mp4 (17 bytes)
Return code: 0

and Restore GUI:

image

and yet I had all of the upper folders created on CLI restore to F:\testrestore.
I’m also using --dont-compress-restore-paths=true to make it like error:

which has that full-path look, but I’d like to know what was asked, and how.

My only objection (since I can’t repro issue) is that time stamps weren’t set.

F:, Filme & Dokus, and Filme all have restore time. Only file got its old time.

First two above can be forgiven better, but Filme is actually in the database.

My CLI restore (since GUI worked) said to restore “f:\Filme & Dokus\Filme\”

@ts678 I’m not quite sure what exactly you mean. I’ll answer what I can, in case you miss sth let me know.

Yes. The test is a new backup-job with just standard settings and password set. (export-file see below)

Is this a GUI restore directly to a localhost address, or are there proxies that may be interfering?

What do you mean by this?

I’m also a bit puzzled how you get lowercase drive letters. My GUI offers them up as uppercase, however for me it doesn’t seem to matter. Works either way.

Yes, the lowercase letter was manual input, but as you mentioned selecting the restore folder from the GUI checkbox doesn’t change the error. Edge browser neither.

{
  "CreatedByVersion": "2.1.0.103",
  "Schedule": null,
  "Backup": {
    "ID": "37",
    "Name": "testbackup",
    "Description": "",
    "Tags": [],
    "TargetURL": "file://D:\\test\\",
    "DBPath": "C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Local\\Duplicati\\TOHFTQMWUE.sqlite",
    "Sources": [
      "E:\\Filme \u0026 Dokus\\Filme\\Kreutzer_kommt_HQ.mp4",
      "E:\\My Virtual Machines\\Linux Mint\\Logs\\"
    ],
    "Settings": [
      {
        "Filter": "",
        "Name": "encryption-module",
        "Value": "aes",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "compression-module",
        "Value": "zip",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "dblock-size",
        "Value": "50mb",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "passphrase",
        "Value": "0123456789",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "--restore-legacy",
        "Value": "false",
        "Argument": null
      }
    ],
    "Filters": [],
    "Metadata": {
      "LastBackupDate": "20241225T210231Z",
      "BackupListCount": "1",
      "TotalQuotaSpace": "262143995904",
      "FreeQuotaSpace": "715829248",
      "AssignedQuotaSpace": "-1",
      "TargetFilesSize": "529297483",
      "TargetFilesCount": "23",
      "TargetSizeString": "504,78 MB",
      "SourceFilesSize": "530503185",
      "SourceFilesCount": "6",
      "SourceSizeString": "505,93 MB",
      "LastBackupStarted": "20241225T210231Z",
      "LastBackupFinished": "20241225T210237Z",
      "LastBackupDuration": "00:00:06.1032179",
      "LastVacuumDuration": "00:00:00.0121476",
      "LastVacuumStarted": "20241225T210237Z",
      "LastVacuumFinished": "20241225T210237Z",
      "LastErrorDate": "20241226T211541Z",
      "LastErrorMessage": "One or more errors occurred. (Could not find a part of the path \u0027\\\\?\\D:\\testrestore\\E\\Filme \u0026 Dokus\\Filme\\Kreutzer_kommt_HQ.mp4\u0027.)",
      "LastRestoreDuration": "00:00:01.6995090",
      "LastRestoreStarted": "20241226T210211Z",
      "LastRestoreFinished": "20241226T210212Z"
    },
    "IsTemporary": false
  },
  "DisplayNames": {
    "E:\\Filme \u0026 Dokus\\Filme\\Kreutzer_kommt_HQ.mp4": "Kreutzer_kommt_HQ.mp4",
    "E:\\My Virtual Machines\\Linux Mint\\Logs\\": "Logs"
  }
}

The localhost address shows up in the browser URL that you use. It browses on local system:

http://localhost:8200/ngax/index.html#/

If you were coming from another system, it would take more setup and URL would be different.
There is also a chance that there is some networking in between that messes with the request.

If this was necessary because you could not browse to the drive, note drive letters may vary by user, and you are possibly running Duplicati as a Windows service as SYSTEM user, and drive assignments possibly differ from what you see as you. You described E: once. What’s drive D:?

You can check About → System information line for UserName to see what user you’re running.

“DBPath”: “C:\WINDOWS\system32\config\systemprofile\AppData\Local\Duplicati\TOHFTQMWUE.sqlite”,
“Sources”: [
“E:\Filme \u0026 Dokus\Filme\Kreutzer_kommt_HQ.mp4”,
“E:\My Virtual Machines\Linux Mint\Logs\”

First line is where default Windows service job DB might land. Is this Duplicati run as a service?
Make very sure drive letters are what you think they are, if the user differs. Can you run as you?

First source line surprised me, as I expected a folder rather than a specific file to be backed up.
Second source line surprised me, as I was after simplest config that fails. Can you delete that?

I tried setting up something similar to yours, except running as me, and with only one Logs file.
On Restore screen, I pick Filme & Dokus, then only change the “Pick location” to F:\testrestore.
Works fine.

he localhost address shows up in the browser URL that you use. It browses on local system:

Ah, ok. And yes, it’s local

If this was necessary because you could not browse to the drive, note drive letters may vary by user, and you are possibly running Duplicati as a Windows service as SYSTEM user, and drive assignments possibly differ from what you see as you.

Actually I’m running Duplicati as service, but the drives show up fine in the GUI. Manual input was just faster at the moment.

But when checking About I noticed that there were still global options configured:

--snapshot-policy=On
--dont-compress-restore-paths=true
--auto-cleanup=true
--threshold=5
--auto-vacuum=true
--auto-vacuum-interval=1M

I assumed --dont-compress-restore-paths=true was responsible and disabled it, which did the trick. Can you confirm?

You described E: once. What’s drive D:?

E is the source-drive
D is my drive with the restore-target (d:\testrestore) and also backup-destination (d:\test). But I think that should be ok.

Confirmed, which is interesting because I was trying that earlier, when it looked like you had it on.

I watched with Process Monitor to see what Duplicati was doing on the F: drive. At restore, got

image

but one can’t make too much of the low-level stuff, as I think sometimes CreateFile is just a test.

Regardless, I now have at least one case that fails. Major step forward, and thanks for the leads.

EDIT:

Some simple steps for repro. I’m using F: drive (USB thumb drive), but I assume C: will also fail:

Set dont-compress-restore-paths

Make F:\level0.txt containing the word level0

Backup that file

Restore that file to “Pick location” of F:\testrestore

If I help it by creating F:\testrestore\F it succeeds.

1 Like

Thank you @Ralf and @ts678 for reporting the issue, for providing the detailed bug hunt, and for the bug reproduction steps! It has been fixed and merged in PR 5840, which also adds a CI test capturing the bug to prevent it from breaking in the future. It should be part of future releases.

1 Like