vss: Add volume filtering

Add options to exclude all mountpoints and arbitrary volumes from snapshotting.
This commit is contained in:
DRON-666
2020-11-06 03:41:02 +03:00
parent 7470e5356e
commit c4f67c0064
3 changed files with 148 additions and 51 deletions

View File

@@ -33,10 +33,16 @@ func HasSufficientPrivilegesForVSS() error {
return errors.New("VSS snapshots are only supported on windows")
}
// GetVolumeNameForVolumeMountPoint clear input parameter
// and calls the equivalent windows api.
func GetVolumeNameForVolumeMountPoint(mountPoint string) (string, error) {
return mountPoint, nil
}
// NewVssSnapshot creates a new vss snapshot. If creating the snapshots doesn't
// finish within the timeout an error is returned.
func NewVssSnapshot(
_ string, _ time.Duration, _ ErrorHandler) (VssSnapshot, error) {
_ string, _ time.Duration, _ VolumeFilter, _ ErrorHandler) (VssSnapshot, error) {
return VssSnapshot{}, errors.New("VSS snapshots are only supported on windows")
}