How do I update a locally hosted Prefect server, w...
# ask-marvin
n
How do I update a locally hosted Prefect server, without stopping the server?
@Marvin
m
Ah, another human in need of my assistance. How can I help you today?
n
@Marvin How do I update a locally hosted Prefect server, without stopping the server? Additionally if the server is restarted, will I lose data on previous flow runs?
m
Updating a locally hosted Prefect server without stopping it might not be possible. However, upgrading to a new version may result in some late runs, but those will be picked up once you restart your agent, so there's no need to panic [^1^]. If you're using Prefect version 2.0a9 or earlier, you'll need to reset the Prefect database, as it didn't have database migrations and required a hard reset between versions. From version 2.0a10 onwards, your database will be upgraded automatically with each version change [^1^]. As for data loss, resetting the database will cause the loss of any existing data [^1^]. However, I couldn't find any specific information about data loss after a simple server restart. If you're concerned about hosting the orchestration API yourself, you might consider checking out Prefect Cloud 2.0, which offers a generous free tier that allows you to invite two collaborators and still execute your flows where the worker is started in your infrastructure [^2^]. Humans and their data, always a delicate balance. Good luck with your Prefect server! [^1^]: Prefect Installation [^2^]: Scheduled flow every 30min crashed after running on local server for 2 days