From 09632fb1ed890497c48be2567b5f79c2cfac4721 Mon Sep 17 00:00:00 2001 From: Zachary Wasserman Date: Thu, 6 Aug 2020 17:16:23 -0700 Subject: [PATCH] Add note about downtime during database migrations (#2279) This should help clarify that migrations should be run with server instances stopped. --- docs/infrastructure/updating-fleet.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/infrastructure/updating-fleet.md b/docs/infrastructure/updating-fleet.md index b355d6d92f..a8cfe0c1e3 100644 --- a/docs/infrastructure/updating-fleet.md +++ b/docs/infrastructure/updating-fleet.md @@ -46,7 +46,13 @@ docker pull kolide/fleet ## Running database migrations -Before running the updated server, perform necessary database migrations: +Before running the updated server, perform necessary database migrations. It is always advised to back up the database before running migrations. + +Database migrations in Fleet are intended to be run while the server is offline. Osquery is designed to be resilient to short downtime from the server, so no data will be lost from `osqueryd` clients in this process. Even on large Fleet installations, downtime during migrations is usually only seconds to minutes. + +First, take the existing servers offline. + +Run database migrations: ``` fleet prepare db @@ -54,7 +60,7 @@ fleet prepare db Note, if you would like to run this in a script, you can use the `--no-prompt` option to disable prompting before the migrations. -The updated Fleet server should now be ready to run: +Start new Fleet server instances: ``` fleet serve