Hi, how difficult is it to migrate from the Postgr...
# spicedb
b
Hi, how difficult is it to migrate from the PostgreSQL datastore to a MySQL datastore? We have postgres only for the SpiceDB, but since MySQL is now supported, we'd like to consolidate the data across to the rest of our infrastructure but can't see any documentation on how to migrate across
v
it's not trivial, and has become significantly more complicated since the postgreSQL datastore refactor in 1.14, it means that both implementations are vastly different. We do not support migrating across datastores, and if you want to do that, you should read all data from one cluster, and write it to the other cluster.
long term, we want to implement "bulk import/export" which would help with such migrations
j
It should also be noted that the PG implementation is significantly more deployed than MySQL
b
Okay, so your recommendation for now would be to stick with PG?
Is there anything I need to be aware of in terms of upgrading from 1.4 to 1.17? You say there is a major refactor for postgres in 1.14
v
PG is pretty well tuned and battle tested these days, so that's our recommendation, but you are definitely free to use MySQL! There was a significant refactor in 1.14, but if you are already there, then the complex part is already behind. There is no migrations from 1.14 to 1.170, so it should be easy ride, but as always, we recommend using the SpiceDB-Operator, which orchestrates all migrations and updates for you
b
Sorry, we're n 1.4.0 at the moment, not 1.14
v
oh
yeah, that's definitely a long list of migrations that need to be carefully performed one by one
I don't even know if the SpiceDB-Operator supports deployments that far back
b
In that case, would you recommend we get ourselves onto a separate cluster, and export / import the data 1 by 1 to upgrade?
v
it seems like 1.4.0 should be supported in the update graph: https://github.com/authzed/spicedb-operator/blob/main/validated-update-graph.yaml
my recommendation would be to use the spicedb-operator, it will handle the migrations for you
what I don't know if there is a way to make the operator "adopt" a deployment
I think you should be able to do the migrations manually. Just make sure to update one step at a time. 1.14.0 have multi step migrations that can put a bunch of load on the cluster and also may take some time to run depending on the amount of data
the release notes of each version provide some details of what you have to do