Module Import alias Import alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Expr Call NameLoad NameLoad With Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad Str Str Str Str NameLoad Str NameLoad If CompareNotEq NameLoad Str body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr Str body If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr If CompareIn Str NameLoad body Assign NameStore BinOpAdd Call AttributeLoad Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr attr Str Assign NameStore SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr body Assign NameStore ListLoad Str Str Str Call AttributeLoad Str attr NameLoad Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad Str body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str TryExcept body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list
N/A N/A logging N/A os freezer.utils utils freezer.utils winutils vss_create_shadow_copy N/A N/A windows_volume N/A N/A N/A 
    Create a new shadow copy for the specified volume

    Windows registry path for vssadmin:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VSS\Settings

    MaxShadowCopies
    Windows is limited in how many shadow copies can create per volume.
    The default amount of shadow copies is 64, the minimum is 1 and the maxi-
    mum is 512, if you want to change the default value you need to add/edit
    the key MaxShadowCopies and set the amount of shadow copies per volume.

    MinDiffAreaFileSize
    The minimum size of the shadow copy storage area is a per-computer setting
    that can be specified by using the MinDiffAreaFileSize registry value.

    If the MinDiffAreaFileSize registry value is not set, the minimum size of
    the shadow copy storage area is 32 MB for volumes that are smaller than
    500 MB and 320 MB for volumes that are larger than 500 MB.

    If you have not set a maximum size, there is no limit to the amount
    of space that can be used.

    If the MinDiffAreaFileSize registry value does not exist, the backup
    application can create it under the following registry key:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VolSnap


    Freezer create a shadow copy for each time the client runs it's been
    removed after the backup is complete.

    :param volume: The letter of the windows volume e.g. c:\
    :return: shadow_id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    :return: shadow_path: shadow copy path
     N/A shadow_path None N/A shadow_id None N/A N/A vss_delete_symlink windows_volume N/A N/A N/A winutils DisableFileSystemRedirection N/A N/A path N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ N/A script N/A N/A {0}\scripts\vss.ps1 format path N/A N/A out err N/A N/A utils create_subprocess N/A powershell.exe -executionpolicy unrestricted -command script -volume windows_volume N/A N/A err N/A N/A N/A Exception N/A N/A [*] Error creating a new shadow copy on {0}, error {1} format windows_volume err N/A line N/A N/A out split N/A N/A N/A symbolic line N/A N/A shadow_path N/A N/A N/A N/A N/A line split >> N/A 1 strip N/A N/A __RELPATH line N/A N/A shadow_id N/A N/A N/A N/A N/A N/A N/A N/A line split = N/A 1 strip lower } N/A shadow_id N/A shadow_id N/A 1 N/A N/A N/A logging info N/A N/A [*] Created shadow copy {0} format shadow_id N/A N/A shadow_path shadow_id N/A vss_delete_shadow_copy N/A N/A shadow_id windows_volume N/A N/A N/A 
    Delete a shadow copy from the volume with the given shadow_id
    :param shadow_id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    :return: bool
     N/A N/A N/A winutils DisableFileSystemRedirection N/A N/A cmd N/A vssadmin delete shadows N/A N/A /shadow={0} format shadow_id /quiet N/A N/A out err N/A N/A utils create_subprocess cmd N/A N/A err N/A N/A N/A Exception N/A N/A [*] Error deleting shadow copy with id {0}, error {1} format shadow_id err N/A N/A vss_delete_symlink windows_volume N/A N/A N/A logging info N/A N/A [*] Deleting shadow copy {0} format shadow_id N/A True N/A vss_delete_symlink N/A N/A windows_volume N/A N/A N/A Delete shadow copy symlink on the file system N/A path N/A N/A N/A os path join windows_volume freezer_shadowcopy N/A N/A N/A N/A N/A N/A os path exists path N/A N/A N/A N/A os rmdir path N/A N/A N/A Exception N/A N/A N/A N/A logging error N/A N/A Failed to delete shadow copy symlink {0} format N/A N/A N/A os path join windows_volume freezer_shadowcopy N/A