VSS - Canary 2.0.9.x

Hello,

just a request for clarification, I think I read this the other day, but I’m not sure now:

Canary 2.0.9.100/.101 don’t support snapshots, right?

(I ask because I get warnings when “snapshot:required” or “:on” on corresponding systems - but I haven’t customized anything else either, just installed over the last 2.0.7.103 where there was no warning)

Best regards
Oliver

I don’t recall such a thing. If you can find what you saw, then perhaps we can discuss further.

AFAIK it supports them fine, subject to the usual need to be an elevated admin, SYSTEM, etc.

Please describe. I’ve been running that just fine with this and even the earlier Debug versions.

I did have an install problem, maybe due to installing over maybe 2.0.7.x.
See Release: 2.0.9.101 (Canary) 2024-06-27 for info and a fix that I tried.
That way seems really easy, but if you like you can test uninstall/reinstall.

Thanks for the clarification. I have warnings on several systems when I set snapshot-policy to “Required” or “On”.

I have been using Duplicati for several years, and I always deploy updates via a script. I don’t want a tray icon, I want the Windows service. For version 2.0.9.x I had to adapt the script (the number “2” is dropped), I’ll show you the adapted script for your information:

Net stop Duplicati
Taskkill /im Duplicati* /F
MkDir %ALLUSERSPROFILE%\Duplicati
MkDir %ALLUSERSPROFILE%\Duplicati\scripts
duplicati-2.0.9.101_canary_2024-06-27-win-x64-gui.msi /quiet
"C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" uninstall
"C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" install --log-retention=1D --server-datafolder=%ALLUSERSPROFILE%\Duplicati
Net start Duplicati
Del "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\Duplicati 2.lnk"
Del "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\Duplicati.lnk"
Del "C:\Users\Public\Desktop\Duplicati 2.lnk"
Del "C:\Users\Public\Desktop\Duplicati.lnk"

I am also cleaning up leftovers from the previous version. As I said, this script has worked very well with the updates before 2.0.9.x in recent years. I have always distributed the Canary version very quickly (Windows Server 2019/2022, Windows 10/11).

In addition, this time it was necessary to stop the service beforehand (this was not necessary for the updates before 2.0.9.x) and remove it:

Net stop Duplicati
Taskkill /in Duplicati* /F
"C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" uninstall

And I had to run my installation script twice. this was not necessary with the updates before.

Anyway, Duplicati now works as usual on all systems, just not the VSS function. I will limit myself to the VSS function in this thread:

I have now also tried a repair via the MSI file once on my desktop PC. I also run the service with my user account (local admin, PC not in a domain), normally Duplicati runs well with SYSTEM account.

Nevertheless, when running with Snapshot=Required, I get the following message for each of my drives:

* 2024-06-29 17:34:40 +02 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: D:\ IOException: Falscher Parameter. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\'
* 2024-06-29 17:34:40 +02 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: S:\ IOException: Falscher Parameter. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2\'
* 2024-06-29 17:34:40 +02 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: D:\ IOException: Falscher Parameter. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\'
* 2024-06-29 17:34:40 +02 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: S:\ IOException: Falscher Parameter. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2\'

And that’s the problem.On computers on which no snapshot is required, Duplicati continues to work perfectly well after this update procedure.

I don’t know if that was intentional or not. This was mentioned here and in my linked post.

How so? What was the problem without stop? One guess is that the old way installed the update into a different newly created folder, so didn’t try to overwrite something now being run (may fail).

Again, a description of the reason would help.

A translation of Falscher is Wrong, but I wonder if Incorrect is the computer word, for example:

snapshot-policy USN plus attribute exclude may exclude all selected files

which was filed on 2.0.7.1, but I’m not sure what the below was tested on. It looks like yours…

2024-05-14 19:01:57 +02 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: C:\
System.IO.IOException: Incorrect Parameter. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy19\'
   at System.IO.File.GetAttributes(String path)
   at Duplicati.Library.Common.IO.SystemIOWindows.GetFileAttributes(String path) in Duplicati\Library\Common\IO\SystemIOWindows.cs:line 328
   at Duplicati.Library.Snapshots.WindowsSnapshot.GetAttributes(String localPath) in Duplicati\Library\Snapshots\WindowsSnapshot.cs:line 223
   at Duplicati.Library.Utility.Utility.EnumerateFileSystemEntries(String rootpath, EnumerationFilterDelegate callback, FileSystemInteraction folderList, FileSystemInteraction fileList, ExtractFileAttributes attributeReader, ReportAccessError errorCallback)+MoveNext() in Duplicati\Library\Utility\Utility.cs:line 390

Can you run with About → Show log → Live → Warning, and expand the warning to compare?

Do you mean the following?

{"ClassName":"System.IO.IOException","Message":"Falscher Parameter. : '\\\\?\\GLOBALROOT\\Device\\HarddiskVolumeShadowCopy4\\'","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at System.IO.File.GetAttributes(String path)\r\n at Duplicati.Library.Common.IO.SystemIOWindows.GetFileAttributes(String path)\r\n at Duplicati.Library.Snapshots.WindowsSnapshot.GetAttributes(String localPath)\r\n at Duplicati.Library.Utility.Utility.EnumerateFileSystemEntries(String rootpath, EnumerationFilterDelegate callback, FileSystemInteraction folderList, FileSystemInteraction fileList, ExtractFileAttributes attributeReader, ReportAccessError errorCallback)+MoveNext()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2147024809,"Source":"System.Private.CoreLib","WatsonBuckets":null}

Yes. Those look like the same stack trace except for language used and lines run together.
Maybe we’ll hear some more speculation or background from the developers on that Issue.

EDIT:

Seen by Google search "IOException: Incorrect Parameter. GLOBALROOT" "Duplicati"
That’s the only search result, so I have little history. Omitting "Duplicati" doesn’t get any more.
I suppose if you wanted to, you could try to watch action on your snapshot with Process Explorer.

Just an idea, I’m not sure and am just leaving on a trip and can’t look into it further but:

As of version 2.0.9.x, VSS no longer works when backing up an entire drive (for example, “D:\”). If you only back up subfolders (for example “D:\TEST”), then it still works.

@ts678, or does it also work for you with a complete volume?

Addition: It may even work, but it does not report a success, but gives the status “Warning” at the end.

Which case? Is that an additional note on the subfolders case (which is like what I usually run)?

As always, the actual warning is useful if you get one. Which case is the one you showed from?

If the warnings differ, are they always at the end of the backup? Are any at the start of backups?

I think the popups on the GUI show at the end, but that doesn’t mean the problem wasn’t earlier.

The job log has timestamps, and so does log-file if you prefer to go that way to capture warnings.

As of version 2.0.9.x, VSS no longer works when backing up an entire drive (for example, “D:\”). If you only back up subfolders (for example “D:\TEST”), then it still works.

When backing up complete drives with VSS, the following warning appears for each drive as of 2.0.9.x:

{“ClassName”:“System.IO.IOException”,“Message”:“Falscher Parameter. : ‘\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy4\’”,“Data”:null,“InnerException”:null,“HelpURL”:null,“StackTraceString”:" at System.IO.File.GetAttributes(String path)\r\n at Duplicati.Library.Common.IO.SystemIOWindows.GetFileAttributes(String path)\r\n at Duplicati.Library.Snapshots.WindowsSnapshot.GetAttributes(String localPath)\r\n at Duplicati.Library.Utility.Utility.EnumerateFileSystemEntries(String rootpath, EnumerationFilterDelegate callback, FileSystemInteraction folderList, FileSystemInteraction fileList, ExtractFileAttributes attributeReader, ReportAccessError errorCallback)+MoveNext()",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:null,“HResult”:-2147024809,“Source”:“System.Private.CoreLib”,“WatsonBuckets”:null}

When? Start? Middle? End? Aside from warnings, is backup backing up any unlocked files?

I’m running 2.0.9.101 now on a backup of C:\ with excludes. vssadmin list shadows has

Contents of shadow copy set ID: {b446390e-4068-45b7-a38b-26c00ce0424b}
   Contained 1 shadow copies at creation time: 6/30/2024 8:27:24 AM
      Shadow Copy ID: {04b31535-9779-4947-8c3a-3f946933c52c}
         Original Volume: (C:)\\?\Volume{bbb9f1b2-0000-0000-0000-300300000000}\
         Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy56
         Originating Machine: HP4
         Service Machine: HP4
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: Backup
         Attributes: Differential, Auto recovered

It’s currently in some very slow SQL (big backups get that way), so I won’t know ending soon.

Just clarifying that it should work as before.

It looks like the error is attempting to get the attributes of the snapshot root. My best guess is that this is maybe because it is trying to get the drive attributes instead of the directory attributes.

I am not aware of any changes that would cause this in 2.0.9.x vs 2.0.7.103.

Looking forward to hearing what the results are. Maybe we can sniff out the detail that causes the warning by comparing your setups.

I reproduced the VSS warning on 2.0.9.101 running as a service, and am trying to narrow it.

EDIT 1:

Results were not very consistent, and I don’t know if it’s a new issue. My regular occasional complete drive (after some exclude) backup wound up empty, taking about a day to do that.

I tried a new C:\ backup with an include of a small folder to get an implied exclude of others.
That got the warning. I tried a large source folder, but so far, drive root seems to be needed.

EDIT 2:

Verbose log file shows warning is pretty early in the backup:

2024-07-01 10:03:43 -04 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started
2024-07-01 10:04:22 -04 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started:  ()
2024-07-01 10:04:22 -04 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed:  (6 bytes)
2024-07-01 10:04:22 -04 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: C:\
System.IO.IOException: The parameter is incorrect. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy67\'
   at Duplicati.Library.Snapshots.WindowsSnapshot.GetAttributes(String localPath)
   at Duplicati.Library.Utility.Utility.EnumerateFileSystemEntries(String rootpath, EnumerationFilterDelegate callback, FileSystemInteraction folderList, FileSystemInteraction fileList, ExtractFileAttributes attributeReader, ReportAccessError errorCallback)+MoveNext()
2024-07-01 10:04:22 -04 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingSourcePath]: Including source path: C:\
2024-07-01 10:04:22 -04 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: C:\
System.IO.IOException: The parameter is incorrect. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy67\'
   at Duplicati.Library.Snapshots.WindowsSnapshot.GetAttributes(String localPath)
   at Duplicati.Library.Utility.Utility.EnumerateFileSystemEntries(String rootpath, EnumerationFilterDelegate callback, FileSystemInteraction folderList, FileSystemInteraction fileList, ExtractFileAttributes attributeReader, ReportAccessError errorCallback)+MoveNext()
2024-07-01 10:04:22 -04 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingSourcePath]: Including source path: C:\
2024-07-01 10:04:23 -04 - [Verbose-Duplicati.Library.Main.Operation.Backup.UploadRealFilelist-RemovingLeftoverTempFile]: removing temp files, as no data needs to be uploaded
2024-07-01 10:04:23 -04 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started:  ()
2024-07-01 10:04:23 -04 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed:  (6 bytes)

Process Monitor view of all the Duplicati.Server actions on the snapshot happens to be at 10:04:

and job log shows 0 files, which is what I unexpectedly got on my drive backup when finally done

EDIT 3:

Returning to my production backup to give it some more runs to see if it will actually get files:

and there are no warnings given, just the no-files-found-on-C:\ problem (so arguably worse).

EDIT 4:

2.0.8.1 Beta VSS seemed to do fine on the special test with drive root and subfolder include.
The latter did not do as well as hoped on the implied exclude of everything else, as it had to seemingly look through the entire filesystem – and it also backed up many or all shortcuts…

image

The bottom two rows are the folder and file I was expecting, and not the -200 rows above it.
Regardless, the only warnings it gave were ones where file permissions didn’t allow access.

As another example where snapshot issues don’t guarantee warnings will be seen, there is:

which seem to be in the right process and timeframe.

So it seems like something is indeed somehow working differently in 2.0.9.101. My previous production backup on the drive was on 2.0.7.100 according to the manifest inside a .zip file.

1 Like

Problem with VSS warnings and not finding any files is reproducible on a 100 MB VHD which is a much nicer test platform than my actual C:\ drive. Also, somewhat fewer unwanted files are there.

V:\>dir /ah
 Volume in drive V is New Volume
 Volume Serial Number is C2C3-E7A6

 Directory of V:\

07/03/2024  06:57 AM    <DIR>          $RECYCLE.BIN
07/05/2024  01:15 PM    <DIR>          System Volume Information
               0 File(s)              0 bytes
               2 Dir(s)      85,295,104 bytes free

V:\>dir
 Volume in drive V is New Volume
 Volume Serial Number is C2C3-E7A6

 Directory of V:\

07/05/2024  07:25 AM                 1 in_root.txt
               1 File(s)              1 bytes
               0 Dir(s)      85,295,104 bytes free

V:\>
V:\>"C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe" backup "file://C:\Duplicati Backups\vhd1\\" "V:\\" --backup-name=VHD1 --dbpath="C:\Windows\system32\config\systemprofile\AppData\Local\Duplicati\JCKJYWHHLF.sqlite" --backup-id=DB-4 --encryption-module= --compression-module=zip --dblock-size=50mb --no-encryption=true --snapshot-policy=On --disable-module=console-password-input
Backup started at 7/5/2024 1:37:53 PM
Checking remote backup ...
  Listing remote folder ...
Scanning local files ...
  0 files need to be examined (0 bytes)
Error reported while accessing file: V:\ => The parameter is incorrect. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy86\'
Error reported while accessing file: V:\ => The parameter is incorrect. : '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy86\'
Checking remote backup ...
  Listing remote folder ...
Verifying remote backup ...
Remote backup verification completed
  Downloading file duplicati-20240705T170526Z.dlist.zip (455 bytes) ...
  Downloading file duplicati-i3d9daaa05e2140d38a1a9acf602639c5.dindex.zip (606 bytes) ...
  Downloading file duplicati-b73a1f586e1a24bcca0ddb0cd8b121176.dblock.zip (1000 bytes) ...
  Duration of backup: 00:00:07
  Remote files: 10
  Remote size: 11.25 KB
  Total remote quota: 930.97 GB
  Available remote quota: 42.01 GB
  Files added: 0
  Files deleted: 0
  Files changed: 0
  Data uploaded: 0 bytes
  Data downloaded: 2.01 KB
Backup completed successfully!

V:\>

The GUI view of a failure is here.

@ts678 Thanks for suggesting a really easy way to replicate this error!

@ollibraun I have found that adding the advanced option --use-vss-mapping=true fixes the issue.

The problem is that the snapshots are created as the UNC paths, for example:
V: becomes \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2.

In previous versions of AlphaVSS this could be mapped 1:1 so V:\a\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2\a.

In the new logic, something is different with processing the paths so now we need to use \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2\\a.

I have added the extra backslash to the code, but you can use the --use-vss-mapping=true fix in either case.

1 Like

Assuming that was a typo for --vss-use-mapping=true. Verified that it fixes the VHD test case.

Activate this option to map VSS snapshots to a drive (similar to SUBST, using Win32 DefineDosDevice). This will create temporary drives that are then used to access the contents of a snapshot. This workaround can speed up file access on Windows XP.

which sounded so inapplicable that I forgot it existed, but now it’s nice. Thanks for the suggestion.

1 Like

Many thanks for your efforts! I won’t be able to implement this for a few days, but I’m sure you’ve solved the problem.