Root Cause
When Zeabur creates a volume, it defaults the PVC's mountPath to /insforge-storage (root directory), but the insforge application actually writes files to /app/backend/insforge-storage.
The mismatch between these two paths leads to:
- PVC mounted at
/insforge-storage→ Persistent, but the app doesn't write here. - App writes to
/app/backend/insforge-storage→ No PVC protection, just temporary space within the container.
Every time the pod restarts, the container filesystem resets, and the data in /app/backend/insforge-storage is lost.
Solution
Pre-check
Check if there is any data in /app/backend/insforge-storage inside the current pod that needs to be preserved:
kubectl exec -n <namespace> <pod-name> -- ls -la /app/backend/insforge-storage/
Step 1: Backup data to PVC if necessary
Before changing the mountPath, while the pod is still running, copy the data into the currently mounted PVC (/insforge-storage):
kubectl exec -n <namespace> <pod-name> -- cp -r /app/backend/insforge-storage/. /insforge-storage/
This ensures the data is safely stored in the PVC, allowing you to retrieve it from the correct location after updating the mountPath.
Step 2: Modify the Deployment's volumeMount mountPath
Find the corresponding Deployment (service-698431469758a4530cd3b774) and change the volumeMounts path from:
mountPath: /insforge-storage
to:
mountPath: /app/backend/insforge-storage
Step 3: Rollout
After applying the changes, let the pod restart. The new pod will mount the PVC directly to /app/backend/insforge-storage, ensuring that the data written by the app is truly persistent.