{ if (IntOption('dump_integrity_check') || $NS['check_archive']) { if (haveTime()) { $tar = new CTarCheck; $tar->EncryptKey = $NS['dump_encrypt_key']; if (!$tar->openRead($NS["arc_name"])) RaiseErrorAndDie(GetMessage('DUMP_NO_PERMS_READ').'<br>'.implode('<br>',$tar->err)); else { if(($Block = intval($NS['Block'])) && !$tar->SkipTo($Block)) RaiseErrorAndDie(implode('<br>',$tar->err)); while(($r = $tar->extractFile()) && haveTime()); $NS["Block"] = $tar->Block; if ($r === false) RaiseErrorAndDie(implode('<br>',$tar->err)); if ($r === 0) $NS["step"]++; } $tar->close(); } } else $NS["step"]++; }
if ($arParams["disk_space"] > 0) { CDiskQuota::updateDiskQuota("file", $size, "add"); } $name = CTar::getNextName($name); } DeleteDirFilesEx(BX_ROOT . '/backup/clouds'); } // Integrity check if ($arParams['dump_integrity_check']) { ShowBackupStatus('Checking archive integrity'); $tar = new CTarCheck(); $tar->EncryptKey = $arParams['dump_encrypt_key']; if (!$tar->openRead($NS["arc_name"])) { RaiseErrorAndDie(GetMessage('DUMP_NO_PERMS_READ') . '<br>' . implode('<br>', $tar->err), $NS['arc_name']); } else { while ($r = $tar->extractFile()) { } if ($r === false) { RaiseErrorAndDie(implode('<br>', $tar->err), $NS['arc_name']); } } $tar->close(); } $DB->DoConnect(); // Send to the cloud if ($arParams['dump_bucket_id']) { ShowBackupStatus('Sending backup to the cloud'); if (!CModule::IncludeModule('clouds')) { RaiseErrorAndDie(GetMessage("MAIN_DUMP_NO_CLOUDS_MODULE"), $NS['arc_name']); } while (true) {