Taking a snapshot - this is where any backup begins. Until we know how to flush all buffers to disk and bring data files to a consistent state, we do not make backups, but copy files with unpredictable contents inside. Understanding the importance of snapshots, all vendors try to give us, if not a completely finished function (like the Time Mashine in MacOS), then at least a set of knobs that can be pulled (like the dm-snap module in the Linux kernel).
- Microsoft Windows, Volume Shadow Copy , VSS (Volume Snapshot Service). - , , , . - .
, , , . Microsoft - . - , , , . . - , . , ?
vssadmin - , , . , , , - , .
, VSS. , , VSS shadow copy. , .
VSS
, 90% , , 10% . .
, , , , , - - . , . , . .
. - . Microsoft, - , Shadow Storage, . . - . - , ( , , ). - . , , , .
VSS
VSS : GUI . , . , Windows Server 2019, , : Configure Shadow Copies Restore previous versions.
, , , , , . , , diff area - , . , . , - .
, , Restore previous versions. , , , .
, , , powershell ( cmd, ) - : vssadmin diskshadow. , WinXP/Win2003. Windows 8. - โโ , . diskshadow Windows. vssadmin, , , . .
: , . , , , .
vssadmin diskshadow. , Another shadow copy is in progress. , . .
VSS
, , : - , . : ? , , () . , . ? , - . (redirect-on-write, RoW, ) , . , - . (copy-on-write, CoW) , . VSS, , CoW, VMware RoW.
, , . - ?
. ( , .) : SQL Server mdf , - . SQL, , , . , . , , , SQL . - . : . , . , , - , , , - . , , -. , . , .
, ? , SQL , , . , ! : , . SQL Server , ? , , , ? Microsoft, , , : โ , ! !โ. , , Volume Snapshot Service. VSS.
- Windows 2008 Kernel Transaction Manager! ? , . ! , KTM , , - . , . - Exchange Active Directory. :
VSS
, . :
VSS Writer. , , .
, VSS . ) ( vssadmin list writers) ) , , .
, โโ: , VSS . , .
, - - , - . vssadmin list writers State -, Stable, , , , .
VSS Provider. , . , . vssadmin list providers. , Microsoft Software Shadow Copy provider. , , . , . , , Veeam .
VSS Requestor. , VSS . , - , . , , . VSS , . , .
: Volume Shadow Copy , , , . .
, , . , . , , . SnapshotSet. , . - , . , storage snapshot. , , . .
, Prepare for backup. , : . , 60 . Microsoft, . -, , Exchange. , 20 , . , OnFreeze? , , . Veeam โVSSControl: Failed to freeze guest, wait timeout". : VSS , . KB , . , - . , , , , , . , .
( , VSS - ), . , , , , (!!!) , , . , , - - , . - log truncate. , - . , , backup log, . .
? - , , , . VSS CoW , , . non-persistent shadow copy, .
, :
PS C:\Windows\system32> diskshadow
Microsoft DiskShadow version 1.0
Copyright (C) 2013 Microsoft Corporation
On computer: VEEAM, 17.05.2021 19:18:44
DISKSHADOW> add volume c: #
DISKSHADOW> create #
Alias VSS_SHADOW_1 for shadow ID {a1eef71e-247e-4580-99bc-ee62c42221d6} set as environment variable.
Alias VSS_SHADOW_SET for shadow set ID {cc9fab4d-3e7d-44a5-9a4d-0df11dd7219c} set as environment variable.
Querying all shadow copies with the shadow copy set ID {cc9fab4d-3e7d-44a5-9a4d-0df11dd7219c}
* Shadow copy ID = {a1eef71e-247e-4580-99bc-ee62c42221d6} %VSS_SHADOW_1%
- Shadow copy set: {cc9fab4d-3e7d-44a5-9a4d-0df11dd7219c} %VSS_SHADOW_SET%
- Original count of shadow copies = 1
- Original volume name: \\?\Volume{7fd0c79d-0000-0000-0000-602200000000}\ [C:\]
- Creation time: 17.05.2021 19:19:45
- Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2
- Originating machine: veeam.university.veeam.local
- Service machine: veeam.university.veeam.local
- Not exposed
- Provider ID: {b5946137-7b9f-4925-af80-51abd60b20d5}
- Attributes: Auto_Release Differential
Number of shadow copies listed: 1
, Shadow copy ID, VSS_SHADOW_1. , . . .
DISKSHADOW> expose {a1eef71e-247e-4580-99bc-ee62c42221d6} Z:
The shadow copy is a non-persistent shadow copy. Only persistent shadow copies can be exposed.
, , , non-persistent , , , , - , , . , .
DISKSHADOW> delete shadows all # ID
Deleting shadow copy {a1eef71e-247e-4580-99bc-ee62c42221d6} on volume \\?\Volume{7fd0c79d-0000-0000-0000-602200000000}\ from provider {b5946137-7b9f-4925-af80-51abd60b20d5} [Attributes: 0x00420000]...
Number of shadow copies deleted: 1
, , , .
DISKSHADOW> add volume C:
DISKSHADOW> set context persistent #
DISKSHADOW> create
Alias VSS_SHADOW_1 for shadow ID {346d896b-8722-4c01-bf01-0f38b9abe20a} set as environment variable.
Alias VSS_SHADOW_SET for shadow set ID {785983be-e09d-4d2a-b8b7-a4f722899896} set as environment variable.
Querying all shadow copies with the shadow copy set ID {785983be-e09d-4d2a-b8b7-a4f722899896}
* Shadow copy ID = {346d896b-8722-4c01-bf01-0f38b9abe20a} %VSS_SHADOW_1%
- Shadow copy set: {785983be-e09d-4d2a-b8b7-a4f722899896} %VSS_SHADOW_SET%
- Original count of shadow copies = 1
- Original volume name: \\?\Volume{7fd0c79d-0000-0000-0000-602200000000}\ [C:\]
- Creation time: 17.05.2021 19:38:45
- Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3
- Originating machine: veeam.university.veeam.local
- Service machine: veeam.university.veeam.local
- Not exposed
- Provider ID: {b5946137-7b9f-4925-af80-51abd60b20d5}
- Attributes: No_Auto_Release Persistent Differential
Number of shadow copies listed: 1
: Attributes: No_Auto_Release Persistent Differential. expose, , . , , , , , . .
, , , , : 50% . - , .
, , : , , ? , , vssadmin create shadow, , , - , , . : create . ? , , .
Veeam Backup & Replication, , , ( , ), , . , , - , . - , , .
VSS
, , VSS - . , , , , . , . , .
- . ? ? - , . ? . , , .
KB1680: VSS Timeout when backing up Exchange VM, , VSS - 20 , . , .
, VSS , , , ? :
VSS , , . , . , .
. , . . - VSS, .