{"record":{"id":"51d55f7538256aa5","repo":"coollabsio/coolify","slug":"the-storage-backup-archive-is-empty-or-was-not-cre","errorCode":null,"errorMessage":"The storage backup archive is empty or was not created.","messagePattern":"The storage backup archive is empty or was not created\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Jobs/VolumeBackupJob.php","lineNumber":124,"sourceCode":"\n            instant_remote_process([\n                $verifySourceCommand,\n                'mkdir -p '.escapeshellarg($backupDirectory),\n                $archiveCommand,\n            ], $server, timeout: $this->timeout, disableMultiplexing: true);\n            $this->execution->update([\n                'stop_container_ids' => null,\n                'stop_recovery_pending' => false,\n            ]);\n\n            $size = (int) instant_remote_process(\n                ['du -b '.escapeshellarg($backupLocation).' | cut -f1'],\n                $server,\n                disableMultiplexing: true,\n            );\n\n            if ($size <= 0) {\n                throw new \\RuntimeException('The storage backup archive is empty or was not created.');\n            }\n\n            $warning = null;\n            $s3Uploaded = null;\n            $s3CleanupPending = false;\n            $localStorageDeleted = false;\n\n            if ($this->backup->save_s3) {\n                $s3CleanupPending = true;\n                $this->execution->update(['s3_cleanup_pending' => true]);\n\n                try {\n                    $this->uploadToS3($backupLocation, $backupDirectory, $server);\n                    $s3Uploaded = true;\n                    $s3CleanupPending = false;\n                } catch (Throwable $exception) {\n                    $s3Uploaded = false;\n                    $warning = 'S3 upload failed: '.$exception->getMessage();","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Jobs/VolumeBackupJob.php#L106-L142","documentation":"VolumeBackupJob archives a Docker volume on the server, then verifies the result by running `du -b <backupLocation>` over SSH and reading the byte size. If the size is 0 or the command yields nothing, the archive never materialized and this RuntimeException aborts the run before S3 upload, retention cleanup, or container recovery proceed.","triggerScenarios":"The backup command completed without creating the file at backupLocation, or created a zero-byte archive: tar failed silently, the volume is empty or not mounted at the expected path, the staging path is wrong, or the disk filled mid-write.","commonSituations":"Empty or externally-managed volumes; servers out of disk space; wrong or stale backup directory setting; permissions blocking the SSH user from writing the staging path; another process (tmp cleaner, backup janitor) deleting the file between creation and the size check.","solutions":["SSH to the server and check free space (`df -h`) and the backup staging directory contents","Re-run the backup from the UI and read the execution log for the underlying tar command and its exit status","Verify the volume exists and holds data: `docker run --rm -v <volume>:/data alpine du -sb /data`","Check write permissions on the backup directory for the user Coolify connects as"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// pre-flight: confirm disk space on the server before the backup window\n$freeBytes = (int) instant_remote_process(['df -B1 --output=avail / | tail -1'], $server);\nif ($freeBytes < $estimatedArchiveBytes) {\n    // alert and skip instead of producing a 0-byte archive\n}","typeGuard":null,"tryCatchPattern":"Catch \\RuntimeException around the backup execution, mark the execution failed, and persist the message on the execution row so the UI shows why the archive was rejected before any S3 upload or container stop.","preventionTips":["Monitor free disk space on servers that run scheduled volume backups","Verify the volume exists and contains data before stopping containers for the backup","Run one manual backup after creating a new schedule to confirm the archive path and permissions"],"tags":["backup","docker-volume","ssh","disk-space","scheduled-task"],"backgroundTag":"backup-archive-empty","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}