Analysing VSS issues and truncate transacation logs in commandline

start a CMD as administrator if UAC is enabled.

get the GUID of the root path:

vssadmin list volumes
 C:\windows\system32>vssadmin list volumes
 vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
 (C) Copyright 2001-2013 Microsoft Corp.

Volume path: \\?\Volume{30d639e8-0000-0000-0000-100000000000}\
 Volume name: \\?\Volume{30d639e8-0000-0000-0000-100000000000}\
Volume path: C:\
 Volume name: \\?\Volume{30d639e8-0000-0000-0000-401f00000000}\

start diskshadow and add the root path and all desired drive letters. then create the shadow copy. when using the commands “begin backup” and “end backup”, the transaction logs will be truncated.

diskshadow
set verbose on
set context volatile
list volumes
add volume \\?\Volume{30d639e8-0000-0000-0000-100000000000}\
add volume c:
add volume d:
(add all volumes of MS SQL/Exchange/etc)
begin backup --> only if you want to truncate the logs!
create
(wait, see and analyze output)
end backup
list shadows all
delete shadows all

 

This entry was posted in Microsoft and tagged , . Bookmark the permalink.