-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows - Reparse points / cloud files creating a lot of errors in logs #4155
Comments
Additionnal info, I got a couple of files that cannot be backed up with the following error:
Those are also reparse points, (type 0x8000001B says fsutil). Those files should exist on every vanilla recent Windows 10. I've also tried current |
Checked a bit what go command could detect reparse points. |
That method won't help as we cannot just exclude everything which isn't a regular file. Restic definitely should e.g. backup symlinks etc. Why don't you just exclude the whole Nextcloud folder? After all it is pretty much random which files are stored locally and which are not. Always ignoring files which are not available locally also isn't a good idea, as then someone will be very surprised that certain files are not included in the backup (unless we maybe can detect this exact case reliably). |
Sorry if I misguided here. I've put all the necessary file attributes in my first comment, which allow identifying what file is a junction / symlink or non local file. I'm just not a go programmer.
I'm trying to build a solution that works on most Windows computers, without the need to fine tune for every nextcloud/onedrive/dropbox/whatever cloud service.
I agree, this could become an option like PS: My tool is quite prime time ready (did the internationalization today). It's basically restic + GUI+ prometheus support + broad exclusion lists + secure yaml config, all compiled into single executables for Windows and Linux. |
As far as my current fix goes, it's horrible to parse restic output since it will give localized error messages like:
I understand that the localized part is not restic generated but is a windows 'feature', which cannot be changed as in linux with Is there any chance restic is going to be able to detect Windows reparse points ? |
not all reparse points are shortcuts. Here is a list of reparse points produced by any modern windows pc account onedrive online only or savefiles only to pc with onedrive still installed with folder. For my program
|
@jredfox Thanks, that's basically the filtered version of list I offered above, which makes things easier. Any chances restic will get an (opt in) parameter to ignore cloud reparse points in the future ? |
Output of
restic version
restic 0.14.0 compiled with go1.19 on windows/amd64
How did you run restic exactly?
Target machine: Windows 10 21H2 x64 with local only NTFS filesystem.
"restic.exe" backup "c:\Users" --iexclude-file excludes/generic_excluded_extensions --iexclude-file excludes/generic_excludes --iexclude-file excludes/windows_excludes --exclude-caches --use-fs-snapshot
I've ran restic as Administrator and as System, both produced the same results.
I've filtered the logs since there are thousands of files, and left a couple of lines per error type:
What backend/server/service did you use to store the repository?
rest-server 0.11
Expected behavior
The machine I'm backing up is a Windows 10 x64 with nextcloud.
The latter uses virtual file system, just as OneDrive does.
Some files are not present on the disk, and are represented by NTFS reparse points.
Those files can obviously not be backed up, and should thus be automatically excluded by restic.
Actual behavior
restic tries to backup those files, and will fail with error message
The cloud operation is not supported on a read-only volume.
orThe media is write protected.
Steps to reproduce the behavior
Fig 1
You can also achieve this using Onedrive files or probably google drive or dropbox too.
You can check whether a file is a reparse point with fsutil utility:
Which would output something like:
"Valeur de la balise d'analyse" translates to "Reparse Tag Value", which is the reparse point attribute.
Do you have any idea what may have caused this?
restic sees reparse points as standard files.
Do you have an idea how to solve the issue?
Restic should, as it probably already does for NTFS junctions, detect reparse files and exclude them.
Reparse points are identified by file attributes.
In my example above, Googling
0x9000701a
made me findwinnt.h
file in mingw which has a list of all reparse point types:In https://github.com/mirror/mingw-w64/blob/master/mingw-w64-tools/widl/include/winnt.h (line 2298) :
If restic already excludes NTFS junctions via an attribute filter, one could add the specific file attributes as filters.
In C, this would look like something along this:
Sorry, I have no golang knowlegde to help more.
Matybe this could be implemented as part of #3863 which already identifies file types ?
Did restic help you today? Did it make you happy in any way?
I really enjoy restic and decided to invest some time to make it more easy to use for end users.
I am writing a nice backup wrapper and GUI for restic, which adds some missing parts like pre and post backup hooks and a function that makes a new snapshot only if no recent snapshot exists.
This will hopefully go opensource once I ironed out caveats.
Works on Windows and Linux, also has a config gui and a restore gui.
I'd love to have a solution to get rid of those errors.
The text was updated successfully, but these errors were encountered: