Skip to content

[Feature Request] Add 'database restore' command to CLI to enable full Disaster Recovery automation #44

@bfbechlin

Description

@bfbechlin

Currently, the coolify-cli allows users to list and trigger database backups (e.g., coolify database backup trigger), which is excellent for automation. However, there is no equivalent command to restore these backups via the CLI.

To perform a restore programmatically today, users must rely on complex workarounds involving direct Docker container manipulation (e.g., docker cp, docker exec) or manual interaction via the web UI. This limitation prevents the creation of fully automated Disaster Recovery scripts or "Clone to Staging" pipelines where a database needs to be refreshed from a backup without human intervention.

I would like to see a new command added to the CLI that handles the restore process, mirroring the existing backup functionality.

Proposed Syntax:

Restore a specific backup to a target database

coolify database restore --id <database_uuid> --backup <backup_uuid_or_filename>

Desired Behavior:

  • The CLI accepts the target database UUID.
  • The CLI accepts the specific backup ID (from the list obtained via coolify database backup executions).
  • If the backup is stored in S3/MinIO, the CLI handles the download automatically.
  • The CLI injects the dump into the database container, effectively performing the restore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions