Skip to content

[Bug]: Updating volume name while service is running does not migrate persistent data #8816

@beeant

Description

@beeant

Error Message and Logs

Description

When the persistent volume name of a service is updated while the service is running, the change is applied only to the container configuration going forward, but the existing persistent data remains stored in the volume that was attached during the original deployment.

As a result, after redeploying, the service starts with a new empty volume while the original data still exists in the previous volume. This can make it appear as if the database data disappeared.

Actual Behavior

The UI allows updating the volume name while the service is running. After redeployment:
The new container attaches to the new volume name
The original data remains in the old volume
The application starts with an empty data directory
This behavior can be confusing, especially for stateful services like PostgreSQL.

Suggested Improvement

One of the following safeguards could help:
Disable editing volume names while the service is running
Require the service to be stopped before applying volume changes
Display a warning explaining that existing data will remain in the old volume
Coolify should either:

  • prevent updating the volume name while the service is running, or
  • show a clear warning that changing the volume name will attach a new volume and the existing data will remain in the old one unless it is migrated manually.

Steps to Reproduce

  1. Create a PostgreSQL resource with persistent volume A
  2. Deploy the PostgreSQL resource with volume A attached
  3. Create a database in that PostgreSQL instance
  4. Update the volume name from A to B
  5. Restart or redeploy the PostgreSQL resource
  6. The previously created database appears to be gone. However, it still exists in volume A, while the restarted deployment is now using volume B.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.463

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Debian

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    UI/UX🔍 TriageIssues that need assessment and prioritization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions