Volume Shadow Copy
Default vss
SMB shares can be created with VSS feature enabled when ’vss’ option is specified in per-share section of configuration file. For the cases when it is impossible to configure a share with VSS feature (for example, when creating a share with Microsoft Management Console), but we would like VSS feature to be enabled we can specify ’vss’ option globally, so all created shares will have this setting set.
Default: false
vss = false
Default parameters of Volume Shadow Copy
When a share being created has VSS feature enabled either because per-share ’vss’ option or global ’vss’ option is set to true, but there is no per-share ’vss_params’ specified, then global ’vss_params’ option is used for this share. The purpose of global ’vss_params’ option is to be able to build vss root path (the path under which there are directories representing snapshots in @GMT format). To make it possible to have different vss root paths for different shares, ’path’ and ’share_root’ parameters of global option ’vss_params’ can include predefined set of variables that expand to their corresponding values on share creation.
The following variables are supported:
- share.netname – expanded as the name of the share. Share name is the value of ’netname’ option of share section.
- share.path.dirname – expanded as dirname of the share path. Share path is the value of ’path’ option of share section. Dirname of a path is the original path without the last component.
- share.path.basename – expanded as basename of the share path.
For example let’s consider a snippet from global and share configuration:
[global]
vss = true
vss_params = path=/mnt/.snapshots/${share.netname},share_root=data
[/global]
[share]
netname = SH1
path = /mnt/data
[/share]
In this example snapshot root for ’SH1’ share is:
/mnt/.snapshots/SH1
Another example:
[global]
vss = true
vss_params = path=${share.path.dirname}/.snapshots,share_root=data
[/global]
[share]
netname = SH1
path = /mnt/shares/sh1/data
[/share]
In this example snapshot root for ’SH1’ share is:
/mnt/shares/sh1/.snapshots
One more example:
[global]
vss = true
vss_params = path=${share.path.dirname}/.snapshots,share_root=${share.path.basename}
[/global]
[share]
netname = SH1
path = /mnt/shares/public
[/share]
In this example snapshot root for ’SH1’ share is:
/mnt/shares/.snapshots
and share_root is:
public
More information on VSS parameters can be read in section 6.12.
vss_params = <parameters>