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