phier1
April 7, 2023, 9:25pm
1
hello,
i can see that on windows restic is not backing following metadata:
file ownership and ACLs on Windows
the “hidden” flag on Windows
is there some specific reason behind it? Is it possible that i can mess backup? Just wondering if tools like Acronis TrueImage do backup these attributes.
Any idea?
thanks!
shd2h
April 8, 2023, 10:16am
2
is there some specific reason behind it?
My guess would be that it just hasn’t been implemented due to lack of demand? I couldn’t find any PRs/Issues for an implementation when searching (although I found a few for documentation).
Is it possible that i can mess backup?
I think that depends on your definition of mess. It simply means those attributes won’t be restored. If that’s a problem or not depends on your use case.
phier1
April 8, 2023, 12:37pm
4
@dron what do u mean by try PR? I can see that both of these are open, ie still under development? I read the discussion but confused…
restic:master
← mchowdhury:master
opened 06:56PM - 06 Jan 22 UTC
<!--
Thank you very much for contributing code or documentation to restic! Plea… se
fill out the following questions to make it easier for us to review your
changes.
-->
What does this PR change? What problem does it solve?
-----------------------------------------------------
File created time (an NTFS specific attribute) and File Attributes don't get backed up or restored on Windows backups. See issue #3478 and #2075
Since we don't want to modify ctimes (because it's used for file change comparison #2212) we store creation time as an extended attribute and restore the creation time value when the file is restored.
<!--
Describe the changes and their purpose here, as detailed as needed.
-->
Was the change previously discussed in an issue or on the forum?
----------------------------------------------------------------
<!--
Link issues and relevant forum posts here.
If this PR resolves an issue on GitHub, use "Closes #1234" so that the issue
is closed automatically when this PR is merged.
-->
This issue was filed in #3478 and #2075
A related issue is #1401 for backing up entire NTFS extended attributes. This uses microsoft provided go-winio library. In the future this would be a better approach but would be a significant re-write. See this comment: https://github.com/restic/restic/issues/1401#issuecomment-392959322
Checklist
---------
<!--
You do not need to check all the boxes below all at once. Feel free to take
your time and add more commits. If you're done and ready for review, please
check the last box. Enable a checkbox by replacing [ ] with [x].
-->
- [x] I have read the [contribution guidelines](https://github.com/restic/restic/blob/master/CONTRIBUTING.md#providing-patches).
- [x] I have [enabled maintainer edits](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
- [ ] I have added tests for all code changes.
- [ ] I have added documentation for relevant changes (in the manual).
- [ ] There's a new file in `changelog/unreleased/` that describes the changes for our users (see [template](https://github.com/restic/restic/blob/master/changelog/TEMPLATE)).
- [ ] I have run `gofmt` on the code in all commits.
- [x] All commit messages are formatted in the same style as [the other commits in the repo](https://github.com/restic/restic/blob/master/CONTRIBUTING.md#git-commits).
- [x] I'm done! This pull request is ready for review.
opened 12:26AM - 07 Nov 18 UTC
category: backup
platform: windows
type: feature suggestion
Output of `restic version`
--------------------------
restic 0.9.3 compiled wi… th go1.11.1 on windows/amd64
running in Windows 10
How did you run restic exactly?
-------------------------------
.\restic restore --repo D:\test\ --target '/restore' latest --host XXX --password-file password.txt
No environmental variables were used in this test.
What backend/server/service did you use to store the repository?
----------------------------------------------------------------
Local file system - no backend server
Expected behavior
-----------------
All files and directories are restored along with their attribute settings. Specifically - the hidden attribute.
Actual behavior
---------------
All files and directories were restored perfectly except the hidden attribute was lost. For example a .git directory will be fully restored but was visible in the restore. This behavior is consistent across multiple scenarios.
Steps to reproduce the behavior
-------------------------------
Create a Windows file and directory marked hidden. Backup and restore then and the hidden attribute is unset.
Do you have any idea what may have caused this?
-----------------------------------------------
No
Do you have an idea how to solve the issue?
-------------------------------------------
I cannot tell if the hidden attribute is lost in the backup phase or the restore phase.
Did restic help you or made you happy in any way?
-------------------------------------------------
I think restic is a great tool.
thanks
DRON
April 8, 2023, 2:10pm
5
You can download GIT , GO and after running these commands use new restic.exe
:
git clone https://github.com/restic/restic
cd restic
git fetch origin pull/3622/head:win-attrs
git merge win-attrs
go run build.go
move restic.exe ..
phier1
April 8, 2023, 2:22pm
6
got it, but is that stable and is there a plan that 3622 will be merged to the main branch?
Thanks
not sure, was that Solved?
Thanks!