aboutsummaryrefslogtreecommitdiff
path: root/doc/migration.md
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-25 18:08:18 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-25 18:08:18 +0100
commitcd6b484d24b638f08221ff1388564d8369d37126 (patch)
treeb820445c91fb811e64cffcc9aaaa35eeac588cbd /doc/migration.md
parent9d08704069f09f185eac0b80653cc39c1335c852 (diff)
downloadjellything-cd6b484d24b638f08221ff1388564d8369d37126.tar
jellything-cd6b484d24b638f08221ff1388564d8369d37126.tar.bz2
jellything-cd6b484d24b638f08221ff1388564d8369d37126.tar.zst
add some mdbook documentation
Diffstat (limited to 'doc/migration.md')
-rw-r--r--doc/migration.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/migration.md b/doc/migration.md
new file mode 100644
index 0000000..089ebf7
--- /dev/null
+++ b/doc/migration.md
@@ -0,0 +1,38 @@
+# Migrating the Database
+
+With some updates the database serialization for changes. This requires a
+migration process. You need to follow this procedure either with every update.
+
+## 1. Export the database
+
+Use the `jellytool` of the previous version to export the database to JSON.
+
+```sh
+mv /path/to/db /path/to/db.old # Rename the DB to avoid conflict later
+jellytool.old migrate export /path/to/db.old export /tmp/jdb
+```
+
+## 2. Run migrations on the JSON dump
+
+> This is not implemented yet. It usually just works without anyway.
+
+## 3. Import the database
+
+Now import your library back to where it usually lives using the `jellytool` of
+the current version.
+
+```sh
+jellytool migrate export /path/to/db import /tmp/jdb
+```
+
+## 4. Delete old Databases
+
+Delete the old database and the JSON dump, they are not required anymore.
+
+> [!CAUTION]
+> Confirm that everything still works and no data ist lost
+
+```
+rm /path/to/db.old
+rm -r /tmp/jdb
+```