-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
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
- Create a PostgreSQL resource with persistent volume A
- Deploy the PostgreSQL resource with volume A attached
- Create a database in that PostgreSQL instance
- Update the volume name from A to B
- Restart or redeploy the PostgreSQL resource
- 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