SECOND ROUND: Help final testing of Windows VSS support!

The Windows VSS PR has now been merged and is part of the master branch!

One can download and use the latest master build from: https://beta.restic.net/?sort=time&order=desc

Hello!

thank you for such update, it was surprise for me, so i tried to use restic on my new installation.

when i try to do backup with admin rights - it works as expected.
when i try to do backup with “Backup Operator” rights - i see this:
VSS error: The caller does not have sufficient backup privileges or is not an administrator: E_ACCESSDENIED (0x80070005)

command that i use:
restic.exe backup --use-fs-snapshot --exclude=“System Volume Information” “D:/”

is that bug? or only admin’s can use it?

@mrPsycho Please see the following article in regards to permissions/rights needed for the VSS snapshot creation, and try the “Backup Operators” group: Security Considerations for Requesters - Win32 apps | Microsoft Docs

Some notes what I’ve seen so far in 0.11.0 using --use-fs-snapshot in a laptop backup to an external drive.

The pagefile and swap are backed up. This indicates that the following registry setting is ignored. Because the pagefile.sys is listed as one those be ignored during a backup.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackupHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup

Pagefile and swap not backed up when doing a regular backup that doesn’t use the snapshot switch.

The hiberfil.sys is another big one. According to Microsoft documentation this ignored by VSS because the hibernation file is something you would never want restore. This is not backed because the file backup error returns “Access is denied”. There are actually about 70 files that restic cannot read from the temporary snapshot it creates. These reading errors are for files not listed in any registry exclusions. Any ideas what is going on here?

Probably not important because restic is for data backup/recovery, not for system crash consistent recoveries.

You probably need set up an exclusion file. That are a minimum (some may never be backed up but leave them in, just in case)

C:$$Recycle.Bin
C:\pagefile.sys
C:\hiberfil.sys
C:\swapfile.sys
C:\ProgramData\Microsoft\Windows Defender\Definition Updates\Backup\*
C:\ProgramData\Microsoft\Windows Defender\Support\*.log
C:\Windows\Temp\MpCmdRun.log
C:\Windows\SoftwareDistribution\DataStore\Logs\*
C:\Users\*\AppData\Local\Temp\Diagnostics\*
C:\Windows\SoftwareDistribution\Download\*
C:\ProgramData\Microsoft\Network\Downloader*
C:\Windows\system32\LogFiles\WMI\RtBackup\*.*
C:\Windows\memory.dmp
C:\System Volume Information\*

Used BleachBit and CCleaner to see what they cleaned up and picked these as optional

C:\Users\*\AppData\Local\Mozilla\Firefox\Profiles\*\cache2*
C:\Users\*\AppData\Local\Thunderbird\Profiles\*\startupCache*

Other Stuff
While testing found running command like this plus attempted to pick up logs.
restic -r V:\BKUP\repo-test_VSS -p V:\BKUP\restic\restic_pwd.txt backup --use-fs-snapshot C:\ 1>log_stdout_VSS.txt 2>log_stderr_VSS.txt

log_stdout_VSS.txt each line contained a lot unnecessary characters which rendered the formatting unsuitable for quick analysis. Its not formatted for windows.
log_stderr_VSS.txt contents formatted nicely, easy to work with.

The archive bit on files is not set by any restic backup with/without snapshots, a good thing.

This registry key is irrelevant to VSS:

See this issue.