The Fly docs and user reports frequently emphasize that volumes are persistent storage but not durable — meaning hardware failures can still lead to data loss. Fly.io
So, I am thinking to switch to PostgreSQL, when going to production. Are PostgreSQL clusters “durable”? If not, how to backup them? Is it required to have any minimum particular number of machines in PostgreSQL cluster, to be durable?
In other words, what do I need to ensure to be sure, that I don’t lose data because of a hardware failure?
MPG clusters use a multi node primary/replica set up, with the replica and primary placed on different physical hosts in the same region. If the host the primary is on suffers a hardware failure, the cluster will failover leadership to the replica. If the former primary’s host is fully offline, we’ll bring up a new replica on another working host and bootstrap it off the new primary.
We do hourly incremental backups and daily full backups of your database which can be used for point-in-time restores to a new cluster. We store 10 days of backups for every cluster. It’s also good practice to store some offsite backups, the simplest option is to just pull a periodic pg_dump of your database and store it yourself.