Back up and rotate keys
Back up
A server's vaults are read with two things together, and with neither alone:
- The master key in
VAULT_HOSTED_MASTER_KEY. Keep it outside the bucket and outside the server's machine. hosted.sqliteunderVAULT_AUTH_DIR(/data/authin the image), which holds every vault's key sealed by the master key, and the accounts, ways in, hashed keys and tokens, and registered clients.
Back up the vaults' storage as well: the folder in VAULT_PATH or the bucket. The search indexes under VAULT_CACHE_DIR are rebuilt from the vaults and need no backup.
Each person can also download a personal vault as a zip from its page at any time.
Rotate the master key
Make a new key with
mindin master-key generate.Set the new key in
VAULT_HOSTED_MASTER_KEYand the old one inVAULT_HOSTED_MASTER_KEY_PREVIOUS, and restart the server.Wrap every vault key under the new one:
mindin master-key rewrap mindin master-key status # vault keys per master keyWhen
statuscounts no vault key under the old key, removeVAULT_HOSTED_MASTER_KEY_PREVIOUSand restart.
VAULT_HOSTED_MASTER_KEY_PREVIOUS takes several keys, space or comma separated.