自测发现U盘数据增量备份有问题
This commit is contained in:
parent
80e2f70953
commit
a45e7a27c0
|
@ -58,7 +58,7 @@ private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// 判断是否增量备份
|
// 判断是否增量备份
|
||||||
bool isIncBackup();
|
virtual bool isIncBackup();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 根据场景获取rsync命令参数
|
* @brief 根据场景获取rsync命令参数
|
||||||
|
|
|
@ -122,6 +122,30 @@ void UDiskDataBackupProxy::deleteFailedData()
|
||||||
parse.deleteItem(m_curUuid);
|
parse.deleteItem(m_curUuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 判断是否增量备份
|
||||||
|
* @return true,增量备份; false,全量备份
|
||||||
|
*/
|
||||||
|
bool UDiskDataBackupProxy::isIncBackup()
|
||||||
|
{
|
||||||
|
QString backupPath;
|
||||||
|
ParseBackupList::BackupPoint point;
|
||||||
|
if (m_backupWrapper.m_uuid.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
backupPath = m_backupWrapper.m_prefixDestPath + BACKUP_SNAPSHOTS_PATH + "/" + m_backupWrapper.m_uuid + "/data";
|
||||||
|
}
|
||||||
|
|
||||||
|
backupPath.replace("//", "/");
|
||||||
|
if (Utils::isDirExist(backupPath)) {
|
||||||
|
m_backupWrapper.m_bIncrement = true;
|
||||||
|
m_backupWrapper.m_type = BackupType::INC_BACKUP_DATA;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 校验剩余空间是否满足备份
|
* @brief 校验剩余空间是否满足备份
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -42,6 +42,8 @@ private slots:
|
||||||
protected:
|
protected:
|
||||||
// 失败则删除相应数据
|
// 失败则删除相应数据
|
||||||
virtual void deleteFailedData();
|
virtual void deleteFailedData();
|
||||||
|
// 判断是否增量备份
|
||||||
|
virtual bool isIncBackup();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// 计算备份所需空间大小
|
// 计算备份所需空间大小
|
||||||
|
|
Loading…
Reference in New Issue