https://prefect.io logo
c

Chandra Manginipalli

09/17/2020, 6:12 PM
When I stop my prefect local server and restart, the flows I registered (and projects created) are gone. Are they not persisted in the backend like the cloud?
d

Dylan

09/17/2020, 6:24 PM
Hi @Chandra Manginipalli! I don’t believe we have a persistent volume built into the Docker compose by default, so yes I think that is expected behavior
I think I can find a good resource for this one moment
That’s the best I can find at the moment
c

Chandra Manginipalli

09/17/2020, 6:46 PM
interesting. I read "_local server stores flow metadata in a Postgres database and exposes a GraphQL API_"  at here. and thought postgres is used by default for storage.
I was under the impression it stores flow runs, etc in that postgres storage and not on a file system through volume. did I misunderstand?
d

Dylan

09/17/2020, 6:47 PM
Yes, but when you tear down your images, I’m not sure that the Postgres database persists unless you configure a persistent volume
So as long as
prefect server start
(of which, part is
docker compose up
) is running, things will persist
If your postgres image is restarted, I’m not sure that data persists unless you set up a persistent volume
c

Chandra Manginipalli

09/17/2020, 7:17 PM
gotcha. so i ended up restarting the prefect server with --use-volume option and this time it was persistent
like it kept my flows and project I created before teh restart....yay!
d

Dylan

09/17/2020, 7:30 PM
Wohoo!
upvote 1
s

SK

01/20/2021, 11:02 PM
Great it works with prefect server start --use-volume
2 Views