Title
#kolide
r

rwx

07/25/2019, 10:27 PM
by chance do you know what exactly does "fleet prepare db" if the database is already initialized and with data from a previous version of kolide?
sundsta

sundsta

07/25/2019, 10:28 PM
It performs the SQL migrations. If there are no migrations to run, it does nothing. We use
fleet prepare db
as the
ExecStartPre
in our systemd service file
r

rwx

07/25/2019, 10:30 PM
so it's safe to run, no data wiping right? i asked because i think that's the same command we issued to initalized the DB
sundsta

sundsta

07/25/2019, 11:07 PM
No data wiping. It runs the SQL statements contained here: https://github.com/kolide/fleet/tree/master/server/datastore/mysql/migrations
11:10 PM
Of course, you should always make sure you have a backup before performing migrations
zwass

zwass

07/26/2019, 1:20 AM
Fleet migrations are designed to maintain your data. That said we absolutely recommend performing backups before running migrations. Basically agreeing with everything @sundsta said.