Skip to content

Conversation

@murataslan1
Copy link
Contributor

Summary

Add support for restoring/importing backups in ServiceDatabase (Docker Compose databases).

Changes

  • Add ServiceDatabase case in buildRestoreCommand() method
  • Handle ServiceDatabase container naming in getContainers() (uses name-service.uuid format)
  • Support PostgreSQL, MySQL, MariaDB, MongoDB detection via databaseType()
  • Mark unsupported ServiceDatabase types (Redis, KeyDB, Dragonfly, Clickhouse)
  • Update updatedDumpAll() to handle ServiceDatabase dump-all mode

Technical Details

The implementation uses the existing ServiceDatabase::databaseType() method to detect the database type and build the appropriate restore command, following the same pattern as standalone databases.

Testing

  • Test with PostgreSQL ServiceDatabase
  • Test with MySQL ServiceDatabase
  • Test with MariaDB ServiceDatabase
  • Test with MongoDB ServiceDatabase

Related Issue

/claim #7529

Demo Video

(Will be added after testing)

andrasbacsai and others added 3 commits November 28, 2025 20:52
Add support for restoring/importing backups in ServiceDatabase (Docker Compose databases).

Changes:
- Add ServiceDatabase case in buildRestoreCommand() method
- Handle ServiceDatabase container naming in getContainers()
- Support PostgreSQL, MySQL, MariaDB, MongoDB detection via databaseType()
- Mark unsupported ServiceDatabase types (Redis, KeyDB, etc.)

Fixes coollabsio#7529
@algora-pbc algora-pbc bot added the 🙋 Bounty claim Issues or PRs that have a Bounty ready to be claimed. label Dec 9, 2025
@ShadowArcanist
Copy link
Member

The target branch has to be next not v4.x

@ShadowArcanist ShadowArcanist added the 💤 Waiting for changes PRs awaiting changes from the author. label Dec 9, 2025
@Cinzya
Copy link
Member

Cinzya commented Dec 9, 2025

Application composes don't have the UI to support imports and backups at the moment.
So just enabling the functionality in the backend won't be enough. The user needs the necessary UI to configure them as well.

@murataslan1 murataslan1 changed the base branch from v4.x to next December 12, 2025 08:44
Add Import Backup section to ServiceDatabase view for supported
database types (PostgreSQL, MySQL, MariaDB, MongoDB).

This enables users to import backups directly from the ServiceDatabase
configuration page, utilizing the existing Import Livewire component.
@murataslan1
Copy link
Contributor Author

Thanks for the feedback! I've added the Import Backup UI to the ServiceDatabase configuration page for supported database types (PostgreSQL, MySQL, MariaDB, MongoDB).

The import functionality uses the existing Import Livewire component. Full backup system (scheduled backups, backup execution views) would require more work - let me know if that's needed for this PR or should be a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙋 Bounty claim Issues or PRs that have a Bounty ready to be claimed. 💤 Waiting for changes PRs awaiting changes from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants