Need Help with Configuring Persistent Storage for Postgres on Fly.io

Hello there,

I’m currently working on a project that involves deploying a PostgreSQL database on Fly.io, and I’m having some difficulties configuring persistent storage for the database. I’ve followed the documentation provided on Fly.io’s website, but I’m still encountering issues.

Here’s a summary of what I’ve done so far:

I created a volume using the fly volumes create command.
I attached the volume to my PostgreSQL service using the fly volumes mount command.
I updated my PostgreSQL configuration to use the mounted volume for storing data.
However, when I deploy my PostgreSQL service, it seems like the data is not persisting across deployments. Each time I redeploy the service, the data gets reset, and I lose all my changes.

I’m wondering if there’s something I’m missing in the configuration or if there’s a step I need to take to ensure that the data persists across deployments. I’ve checked the documentation and searched the forums, but I couldn’t find a solution to my problem.

https://community.fly.io/t/how-to-host-grafana-with-persistent-storage/12467tableau

Any help or guidance on this issue would be greatly appreciated.

Thank you in advance for your assistance!

I’m curious as to why you aren’t using Fly Postgres · Fly Docs; but you are certainly welcome to package and deploy PostgreSQL yourself.

From your symptoms, it appears that you didn’t correctly do the following step:

Without seeing your setup, I can’t diagnose further. But I will say that fly ssh console is usually very useful for debugging these types of problems as you can directly explore and find out what data is actually placed on the volume.

Added postgres, volumes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.