Dokploy/dokploy · critical · Error
error instanceof Error ? error.message : "Error restoring mo
Error message
error instanceof Error ? error.message : "Error restoring mongo backup"
What it means
restoreComposeBackup wraps its whole restore flow in try/catch and rethrows either the caught error's message or the generic fallback 'Error restoring mongo backup' (copy-paste artifact: this is the compose restore, not mongo). Any failure in docker compose commands, volume handling, or file ops surfaces here.
Source
Thrown at packages/server/src/utils/restore/compose.ts:99
emit(
`Restoring database: ${backupInput.databaseName} from ${backupInput.backupFile}`,
);
if (serverId) {
await execAsyncRemote(serverId, restoreCommand);
} else {
await execAsync(restoreCommand);
}
emit("Restore completed successfully!");
} catch (error) {
console.error(error);
emit(
`Error: ${
error instanceof Error ? error.message : "Error restoring mongo backup"
}`,
);
throw new Error(
error instanceof Error ? error.message : "Error restoring mongo backup",
);
}
};
View on GitHub (pinned to 546686ea35)
Solutions
- Read console.error output emitted just before the throw to find the real underlying error
- Verify the backup archive is complete and volumes/paths match the original compose stack
- Ensure docker and compose plugin are available and the user has permissions
- Free disk space and retry the restore
Defensive patterns
Strategy: try-catch
Validate before calling
if (!existsSync(backupPath)) throw new Error('Backup file missing before restore'); Try / catch
try {
await restoreComposeBackup(...);
} catch (e) {
emit(`Restore failed: ${e instanceof Error ? e.message : String(e)}`);
// keep partial state for manual cleanup
} Prevention
- Test restores on a staging stack regularly
- Verify archive integrity before restoring
- Keep docker/compose versions consistent between backup and restore hosts
When it happens
Trigger: Docker CLI errors during compose up, missing backup archive entries, permission issues on volume paths, or a non-Error rejection (e.g. string throw) which triggers the fallback message.
Common situations: Restoring a compose backup with mismatched volume definitions, insufficient disk space, or a partially uploaded backup file.
Related errors
- error instanceof Error ? error.message : "Error restoring ma
- error instanceof Error ? error.message : "Error restoring mo
- error instanceof Error ? error.message : "Error restoring my
- Database file not found after extraction
- BAD_REQUEST
AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27).
Data as JSON: /api/errors/924429664561c41d.
Report an issue: GitHub.