{"record":{"id":"ee670a6a3301b5ea","repo":"coollabsio/coolify","slug":"local-backup-file-is-empty-or-was-not-created","errorCode":null,"errorMessage":"Local backup file is empty or was not created","messagePattern":"Local backup file is empty or was not created","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"app/Jobs/DatabaseBackupJob.php","lineNumber":419,"sourceCode":"                        $this->backup_log = ScheduledDatabaseBackupExecution::create([\n                            'uuid' => $this->backup_log_uuid,\n                            'database_name' => $database,\n                            'filename' => $this->backup_location,\n                            'scheduled_database_backup_id' => $this->backup->id,\n                            'local_storage_deleted' => false,\n                        ]);\n                        $this->backup_standalone_clickhouse($database);\n                    } else {\n                        throw new \\Exception('Unsupported database type');\n                    }\n\n                    $size = $this->calculate_size();\n\n                    // Verify local backup succeeded\n                    if ($size > 0) {\n                        $localBackupSucceeded = true;\n                    } else {\n                        throw new \\Exception('Local backup file is empty or was not created');\n                    }\n                } catch (Throwable $e) {\n                    // Local backup failed\n                    if ($this->database instanceof StandaloneClickhouse) {\n                        deleteBackupsLocally($this->backup_location, $this->server);\n                    }\n                    if ($this->backup_log) {\n                        $this->backup_log->update([\n                            'status' => 'failed',\n                            'message' => $this->error_output ?? $this->backup_output ?? $e->getMessage(),\n                            'size' => $size,\n                            'filename' => null,\n                            's3_uploaded' => null,\n                        ]);\n                    }\n                    try {\n                        $this->team?->notify(new BackupFailed($this->backup, $this->database, $this->error_output ?? $this->backup_output ?? $e->getMessage(), $database));\n                    } catch (Throwable $notifyException) {","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Jobs/DatabaseBackupJob.php#L401-L437","documentation":"Error \"Local backup file is empty or was not created\" thrown in coollabsio/coolify.","triggerScenarios":"Thrown at app/Jobs/DatabaseBackupJob.php:419 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}