2022-03-28 20:23:47 +00:00
|
|
|
//go:build !windows
|
2020-10-24 09:35:57 +00:00
|
|
|
// +build !windows
|
|
|
|
|
|
|
|
package fs
|
|
|
|
|
|
|
|
import (
|
2020-11-06 00:41:02 +00:00
|
|
|
"time"
|
|
|
|
|
2020-10-24 09:35:57 +00:00
|
|
|
"github.com/restic/restic/internal/errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
// MountPoint is a dummy for non-windows platforms to let client code compile.
|
|
|
|
type MountPoint struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSnapshotted is true if this mount point was snapshotted successfully.
|
|
|
|
func (p *MountPoint) IsSnapshotted() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetSnapshotDeviceObject returns root path to access the snapshot files and folders.
|
|
|
|
func (p *MountPoint) GetSnapshotDeviceObject() string {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// VssSnapshot is a dummy for non-windows platforms to let client code compile.
|
|
|
|
type VssSnapshot struct {
|
|
|
|
mountPointInfo map[string]MountPoint
|
|
|
|
}
|
|
|
|
|
|
|
|
// HasSufficientPrivilegesForVSS returns true if the user is allowed to use VSS.
|
2020-11-04 21:14:18 +00:00
|
|
|
func HasSufficientPrivilegesForVSS() error {
|
|
|
|
return errors.New("VSS snapshots are only supported on windows")
|
2020-10-24 09:35:57 +00:00
|
|
|
}
|
|
|
|
|
2024-04-28 22:18:46 +00:00
|
|
|
// GetVolumeNameForVolumeMountPoint add trailing backslash to input parameter
|
2020-11-06 00:41:02 +00:00
|
|
|
// and calls the equivalent windows api.
|
|
|
|
func GetVolumeNameForVolumeMountPoint(mountPoint string) (string, error) {
|
|
|
|
return mountPoint, nil
|
|
|
|
}
|
|
|
|
|
2020-10-24 09:35:57 +00:00
|
|
|
// NewVssSnapshot creates a new vss snapshot. If creating the snapshots doesn't
|
|
|
|
// finish within the timeout an error is returned.
|
2021-03-22 20:31:19 +00:00
|
|
|
func NewVssSnapshot(_ string,
|
2020-11-06 00:41:02 +00:00
|
|
|
_ string, _ time.Duration, _ VolumeFilter, _ ErrorHandler) (VssSnapshot, error) {
|
2020-10-24 09:35:57 +00:00
|
|
|
return VssSnapshot{}, errors.New("VSS snapshots are only supported on windows")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete deletes the created snapshot.
|
|
|
|
func (p *VssSnapshot) Delete() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetSnapshotDeviceObject returns root path to access the snapshot files
|
|
|
|
// and folders.
|
|
|
|
func (p *VssSnapshot) GetSnapshotDeviceObject() string {
|
|
|
|
return ""
|
|
|
|
}
|