docs: 补充第三处损坏证据(netperf2.7安装)与实测脏卷拦截输出
This commit is contained in:
1 parent
9d8ce0c23e
commit
a7180ff696
2 files changed
+62
-33
No files matched your search
+7
-5
@@ -326,11 +326,6 @@ class BackupEngine:
|
||||
def preflight(self):
|
||||
if not os.path.isdir(_long(self.source)):
|
||||
raise BackupError("源目录不存在或不可访问:%s" % self.source)
|
||||
if not os.path.isdir(_long(self.dest)):
|
||||
try:
|
||||
_ensure_dir(self.dest)
|
||||
except OSError as e:
|
||||
raise BackupError("目标目录不存在且无法创建:%s\n%s" % (self.dest, e))
|
||||
|
||||
if _is_within(self.dest, self.source):
|
||||
raise BackupError(
|
||||
@@ -364,6 +359,13 @@ class BackupEngine:
|
||||
self._log("注意: %s 无日志、无校验,异常掉线后必须 chkdsk 修复;"
|
||||
"本工具会在结束时落盘并校验每个文件。" % vol["fs"])
|
||||
|
||||
# 卷健康检查通过后才创建目标目录,避免往坏盘上写任何东西
|
||||
if not os.path.isdir(_long(self.dest)):
|
||||
try:
|
||||
_ensure_dir(self.dest)
|
||||
except OSError as e:
|
||||
raise BackupError("目标目录不存在且无法创建:%s\n%s" % (self.dest, e))
|
||||
|
||||
# ---------- 扫描 ----------
|
||||
def _scan(self):
|
||||
"""扫描源目录。返回 (files, dirs):files=[(abs, rel, size, mtime_ns)]"""
|
||||
|
||||
Reference in new issue
Block a user