https://prefect.io logo
Title
m

Minakshi

02/28/2021, 11:11 PM
Hi team, Is there a way to specify a custom DB to be used with prefect server instead of the default postgres db? Is the prefect server able to save state of running flows on prefect server deploy/upgrades and restarts?
d

Dylan

03/01/2021, 1:10 AM
Hi @Minakshi! To use a persistent volume (which will save state on running flows on prefect server deploy/upgrade/restart with some exceptions) , check this out: https://docs.prefect.io/orchestration/Server/deploy-local.html#database-persistence-and-migrations
To use a fully managed postgres instance, you can update the connection info by overwriting the values in the Prefect Server config: https://github.com/PrefectHQ/server/blob/master/src/prefect_server/config.toml
m

Minakshi

03/01/2021, 1:42 AM
Thanks Dylan, if i were to use a persistent volume as specified in option 1, can i store this volume in s3 or something similar so that it can be reused? What is the recommendation in that case?
d

Dylan

03/01/2021, 2:37 AM
I’m not actually sure 🧐
Let me ask around a bit tomorrow and get back to you
πŸ‘ 1
Looks like you can configure a volume to persist in s3 πŸ‘
m

Minakshi

03/01/2021, 10:29 PM
Got it. Thanks!
another question, regarding the configuration of custom DB, i was wondering if i could use MySql or any other DB instead of Postgres?
d

Dylan

03/01/2021, 10:36 PM
Prefect Server is built to be used with Postgres, I don’t believe you can swap the db
πŸ‘ 1
You already have the best database πŸ˜‰
😁 2