diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-05 00:54:54 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-05 00:54:54 -0400 |
| commit | b38707f9e39d5f7f6dae29e9d020caaa62324aef (patch) | |
| tree | 76831831c178fc9a894f1e0f391bc5e9300f8a61 | |
| parent | 76b3652ccd917a0d7eaeb981f68540c13b73de7e (diff) | |
Wrote down the DB recovery process
| -rw-r--r-- | docs/ops.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/ops.md b/docs/ops.md new file mode 100644 index 0000000..8f21c79 --- /dev/null +++ b/docs/ops.md @@ -0,0 +1,7 @@ +# Operating `hi` + +## Upgrades + +`hi` will automatically upgrade its database on startup. Before doing so, it will create a backup of your database (at `.hi.backup`, or controlled by `--backup-database-url`). If the migration process succeeds, this backup will be deleted automatically. If the migration process _fails_, however, the backup will be left in place. In addition, `hi` will attempt to restore your existing database from the backup before exiting. + +`hi` will not start if the backup database already exists. To restart `hi` after a failure, move the backup database aside. Once you are satisfied that `hi` has recovered successfully, you can delete it. If you need to restore the database manually, you can also copy it overtop of your database using normal filesystem tools (`cp -a .hi.backup. hi`, for example). |
