DiskShadow基本命令:
1、进入DiskShadow命令行:
C:\>diskshadow
2、列出所有的卷影副本:
DISKSHADOW> list shadows all
3、删除指定ID的卷影副本:
DISKSHADOW> delete shadows ID {e9816388-12cb-4a49-9964-c1d24000ca72}
4、删除指定位置最早的一个卷影副本:
DISKSHADOW> delete shadows oldest F:\WindowsImageBackup\x-ServerD
DiskShadow脚本:
DiskShadow命令后面不能直接跟参数,必须用配置文件来提供参数。
5、清理卷影副本脚本(DiskShadow.bat):
c:\Windows\System32\diskshadow.exe /s F:\WinBackupClean\DiskShadow.conf > F:\WinBackupClean\DiskShadow.log
6、清理脚本配置文件(DiskShadow.conf):
delete shadows oldest F:\WindowsImageBackup\x-Server
list shadows all
创建Windows计划任务程序注意事项:
7、如果脚本名字中含有空格或者特殊字符,需要在两端添加双引号,否则会报0x1错误。
"D:\zisync&ssvip-Restart.bat"
8、起始于项目不加双引号:
F:\WinBackupClean
9、脚本中不能含有相对路径(.\),否则报0x2错误
c:\Windows\System32\diskshadow.exe /s F:\WinBackupClean\DiskShadow.conf > F:\WinBackupClean\DiskShadow.log
[THE END]