du: add dovecot index log to the exclude list

This commit is contained in:
Girish Ramakrishnan
2023-10-17 10:00:13 +02:00
parent 9d9a407c3d
commit 47d7536e24

View File

@@ -60,7 +60,7 @@ async function checkPreconditions(backupConfig, dataLayout) {
let used = 0;
for (const localPath of dataLayout.localPaths()) {
debug(`checkPreconditions: getting disk usage of ${localPath}`);
const result = safe.child_process.execSync(`du -Dsb --exclude='*.lock' "${localPath}"`, { encoding: 'utf8' });
const result = safe.child_process.execSync(`du -Dsb --exclude='*.lock' --exclude='dovecot.list.index.log.*' "${localPath}"`, { encoding: 'utf8' });
if (!result) throw new BoxError(BoxError.FS_ERROR, `du error: ${safe.error.message}`);
used += parseInt(result, 10);
}