blob: 000072a6be5e6b953c1d67bdb35598e2d0f3cef4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# Migrating the Database
> [!CAUTION]
> The current architecture for saving to the database will be completely
> rewritten soon.
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 is lost before!
```
rm /path/to/db.old
rm -r /tmp/jdb
```
|