Skip to content
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

Support Volume Shadow Copy on Windows #1412

Open
parasiteoflife opened this issue Feb 17, 2025 · 7 comments
Open

Support Volume Shadow Copy on Windows #1412

parasiteoflife opened this issue Feb 17, 2025 · 7 comments
Labels
A-docs Area: Improvements or additions to documentation A-filesystem Area: Related to the Filesystem in one way or the other A-ui-ux Area: Related to user interfaces and user experience C-enhancement Category: New feature or request O-windows Operating system: Windows P-low Priority: low, not on current prio list

Comments

@parasiteoflife
Copy link

Please add support for VSS on Windows so rustic can backup files in use. Restic supports this with:

--use-fs-snapshot                        use filesystem snapshot where possible (currently only Windows VSS)
@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Feb 17, 2025
@kapitainsky
Copy link
Contributor

kapitainsky commented Feb 19, 2025

Officially Windows support is still being experimental only.

And why Windows and not macOS with APFS? or Linux with BTRFS/ZFS?:) or all of them

IMO it is better left outside of rustic. It is relatively simple to use snapshots - few lines of some script suffice. Rustic then already has features making it easy (like --as-path and various hooks)

I get that not everybody knows what to do - so maybe better to document it instead of adding no core functionality to rustic. Similarly to what is done for other backup software project - kopia - https://kopia.io/docs/advanced/actions/#windows-shadow-copy.

Myself I am happy to add macOS/APFS and Linux/ZFS docs section - something I know and I am using all the time.

@parasiteoflife
Copy link
Author

And why Windows and not macOS with APFS? or Linux with BTRFS/ZFS?:) or all of them

I don't use those but (I don't know about Apple) Linux doesn't have the same problem Windows has with file locking, isn't it?

It is relatively simple to use snapshots - few lines of some script suffice.

While is true that usage is simple, vshadow is not available in the system by default, we have to download the Windows SDK. And while usage is simple we can't expect non-tech people to do this, right? As far as I've been reading in discord one of the goals is to make rustic usage simple enough for everybody to use, I even believe this (VSS usage) should be the default.

@aawsome
Copy link
Member

aawsome commented Feb 21, 2025

About the discussion: I agree with the point of @kapitainsky that this is already possibly using hooks and as-path - so if there are users with a working config for whatever snapshot tool (VSS, brtfs etc) they are using, please provide it and we will add it to the docu!

From my side I can say that the rustic project is open to add such functionality into rustic if it adds value to users. We might want to hide it under a feature flag if there are heavy or complicated dependencies involved, but that's all. I must however say that the time of us maintainers is very limited currently, so there will be no focus on that topic - if there is anyone up with a PR, we'll happily review and add this!

@simonsan
Copy link
Contributor

I agree with @aawsome and @kapitainsky. I already looked into it a bit, and especially for Windows it's quite an annoying thing, with low-level code which might involve unsafe due to WinApi things. So going down that route would not be hassle-free. I think having the option with the hooks is already a thing that composes nicely. And in general, we should be mindful about what we as maintainers pull into rustic, as that enables us to be focussed on the essential things. As long as users have a way to do something, it should be fine. Over time, though, we can spend more effort to improve certain workflows, if they are too hard to do.

@simonsan
Copy link
Contributor

While is true that usage is simple, vshadow is not available in the system by default, we have to download the Windows SDK. And while usage is simple we can't expect non-tech people to do this, right? As far as I've been reading in discord one of the goals is to make rustic usage simple enough for everybody to use, I even believe this (VSS usage) should be the default.

I also agree with this point, essentially. Though I would consider well-structured and written documentation how to achieve this with rustic more valuable. As this is a good trade-off between maintenance effort we pull in for ourselves and enabling the users to do something.

As you mention, it would be nice to have VSS as some kind of default, although this would make users need to run rustic with elevated privileges, which shouldn't be the default. Also, we would essentially work against short-comings of Windows in a way - them not shipping a tool that could be essential to certain people. So from that perspective it feels a bit like fighting against something, Microsoft themselves doesn't want to ship to everyone. Which is unfortunate.

@simonsan simonsan added A-docs Area: Improvements or additions to documentation C-enhancement Category: New feature or request P-low Priority: low, not on current prio list O-windows Operating system: Windows A-ui-ux Area: Related to user interfaces and user experience A-filesystem Area: Related to the Filesystem in one way or the other and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Feb 21, 2025
@avonwyss
Copy link

In order to make a backup application more capable than a file copy on Windows, native VSS support is pretty much a "must-have" feature.

The same discussion was done for Restic in 2018 and they started off with a script solution, but in the end also realized that implementing native support for VSS was pretty much a necessity to make it a viable backup solution on Windows. Here's the issue:
restic/restic#340

@AeliusSaionji
Copy link

While is true that usage is simple, vshadow is not available in the system by default, we have to download the Windows SDK.

fwiw, there appear to be nearly a dozen different official tools for interfacing with vss, and some of them do "come with" Windows. Notably, the powershell script offered by kopia is using powershell itself to handle vss.

I ended up here because I had no idea how to do this and was overwhelmed by the decades worth of support posts each offering differing solutions. And it was here that led me to kopia's wiki.

kopia's sample ps snippet is very simple and dependency free- I'm satisfied with that.

Providing simple and modern instructions in rustic's userguide is a great idea imo! Even if, for some reason, it is later decided that bespoke support is better than 1st party interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Improvements or additions to documentation A-filesystem Area: Related to the Filesystem in one way or the other A-ui-ux Area: Related to user interfaces and user experience C-enhancement Category: New feature or request O-windows Operating system: Windows P-low Priority: low, not on current prio list
Projects
Status: Todo
Development

No branches or pull requests

6 participants