Hi , if the server goes down for some reason, how ...
# prefect-server
g
Hi , if the server goes down for some reason, how to ensure that the data is persistent? Because every time I close and start the server I loose the track of the previous runs and metrics in UI
a
You can have a separate persistent postgresql database that your prefect server connects to.
upvote 1
g
Could you please share a link for the document which I can follow, that would be of great help
g
Thanks
@Amanda Wee hi tried this, mounted the external volume in ec2 and started the server as mention in docs , but still data is not persistent , data is lost at server restart
prefect server start —expose —volume-path /prefect_volume/ This is the command I used
@Anna Geller
a
@Gagan Singh Saluja you can try:
Copy code
prefect server start --use-volume --expose
this will use the default volume in
~/.prefect/pg_data
what Amanda was suggesting is a more robust solution: using an external Postgres database, e.g. you could deploy one on AWS or GCP
g
Thanks, Is there any way to use a volume attached to ec2 @Anna Geller ?
a
you should not confuse a Docker volume with an EBS volume on AWS 🙂 we’re talking about a Docker volume for a Postgres database data here
or: an external database that wouldn’t need any Docker volume at all
g
Oh , okay thanks a lot
👍 1