About the important of extended attributes for Windows NTFS backups

Hi everyone,

This question is more about the NTFS filesystem, but relevant for my Restic backups.

I have been using Restic for a while for my backups and I have quite a lot of data already uploaded to my cloud backup service.

With release 0.17.0 I noticed that “Support Extended Attributes on Windows NTFS” is added. Meaning that until now everything I uploaded did not go with those attributes and if I keep adding snapshots, only the new files would be uploaded with those attributes.
I am therefore wondering if I should redo all the backups from zero and discard what is already in the cloud.

Could someone give me an idea of the importance of those extended attributes in real life situations? can I consider that my backups (which include all sorts of personal documents, pictures, music, etc.) are fully completed as they already are, or should I consider that some relevant information from my files is lost if I ever need to recover those files.

I did read a bit about the extended attributes but I can’t exactly figure out if that’s something some of my files would have used.
Also: from version 0.17.0 will the extended attributes be backed up automatically or should I trigger that somehow?
For my backups I used a script that I found long ago, but the command that execute the backups looks like this:

& $ResticExe --verbose=1 backup $folder_list_D --use-fs-snapshot --tag $tag_D --exclude-file=$WindowsExcludeFile --exclude-file=$LocalExcludeFile *>&1 | Tee-Object -FilePath $logfile -Append

Thank you in advance.

We’re mostly speaking of alternate data streams, which is basically metadata added to the file.
As example, when you download a file from internet, it’s flagged as “downloaded from internet”
Example (sorry for the language)
image

There can be other metadata which some software could use to classify data (ex: data loss prevention which would add a company name and author to a file to trace data leaks).
There were also some viruses who hid themselves in alternate data streams.

Generally speaking, you are “allowed” to lose alternate data streams, except maybe some shady antipiracy software that could use it to make a file “valid” on a platform.

That’s my experience with extended attributes, but don’t take my word for granted :wink:

Thank you!

It seems that there is no possibility of assuring that nothing relevant is lost, unless I go through all my data and one by one check if there could be any relevant metadata in those extended attributes. From what you explained its clear that nothing too important would be lost if I don’t redo the backups, so maybe I will just leave it as a task to do in the future slowly.

Let’s just say that in 20 years of experience (alternate data streams existed in NT4 if I remember well), I did never miss them :wink:

2 Likes

Extended attributes (xattrs) and alternate data streams (ADS) are different things, although they are related. So far, there is NO support for alternate data streams yet, although its work in progress: Back up and restore Windows Alternate Data Streams by aneesh-n · Pull Request #4614 · restic/restic · GitHub .

Extended attributes in Windows are currently primarily used by WSL as a way to store Unix extended attributes on NTFS (yes NTFS supports both ADS and xattrs). They are used to mark downloaded files or specify special file permissions.

2 Likes

Indeed, it looks like I mixed up both xattrs and ADS.

Still, don’t take my word for granted, but my Windows data was never unusable due to missing extended attributes (which most other file backup software aren’t aware of), neither due to missing ADS (which again, most file backup software aren’t aware of).

1 Like

Thank you both for your replies!

Note that there is no need to discard your old backups.
If at one point your restic starts tracking metadata/ADS which it didn’t before, it should find them as new metadata, and add them while reusing the file contents already in the repository.
So your backups from that date would contain extended attributes, but there’s no need to drop your old backups (albeit they might be slightly less precise than those with the xattr).

Anyway, I agree with the other people that you are unlikely to notice missing extended attributes, anyway.

1 Like

Thanks! that’s a very important note. I did plan to eventually redo the backups even if those attributes were probably not relevant, just to be super safe. Knowing that will be automatically backed up in the next snapshot will save me time and money