/claim #7529

Description

Enables backup restore/import functionality for databases deployed via Docker Compose (ServiceDatabase). Previously, ServiceDatabase could create backups but could not restore them through the UI.

Changes Made

  • ✅ Added ServiceDatabase case in buildRestoreCommand() method
  • ✅ Implemented container naming logic for ServiceDatabase (name-service.uuid)
  • ✅ Supports PostgreSQL, MySQL, MariaDB, and MongoDB
  • ✅ Handles both regular and dump_all restore modes

Technical Details

  • File Modified: app/Livewire/Project/Database/Import.php (+41 insertions, -1 deletion)
  • Container Naming: ServiceDatabase uses {name}-{service.uuid} format
  • Database Detection: Leverages existing ServiceDatabase::databaseType() method
  • Consistency: Restore commands match backup logic in DatabaseBackupJob.php

Testing

The implementation has been verified against:

  • PostgreSQL restore commands
  • MySQL restore commands
  • MariaDB restore commands
  • MongoDB restore commands
  • Container naming for ServiceDatabase

Related Issue

Fixes #7529

Claim

Total prize pool $25
Total paid $0
Status Pending
Submitted December 08, 2025
Last updated December 08, 2025

Contributors

GY

Gyanu Mayank

@gyanu2507

100%

Sponsors

IL

Ilias Ism

@me

$25