diff --git a/src/storage/filesystem.js b/src/storage/filesystem.js index 4f4592f46..d82c87dd5 100644 --- a/src/storage/filesystem.js +++ b/src/storage/filesystem.js @@ -73,7 +73,7 @@ function checkPreconditions(apiConfig, dataLayout, callback) { if (result.mountpoint === '/') return callback(new BoxError(BoxError.FS_ERROR, `${apiConfig.backupFolder} is not mounted`)); } - const needed = used + (1024 * 1024 * 1024); // check if there is atleast 1GB left afterwards + const needed = 0.6 * used + (1024 * 1024 * 1024); // check if there is atleast 1GB left afterwards. aim for 60% because rsync/tgz won't need full 100% if (result.available <= needed) return callback(new BoxError(BoxError.FS_ERROR, `Not enough disk space for backup. Needed: ${prettyBytes(needed)} Available: ${prettyBytes(result.available)}`)); callback(null);