27 lines
1.2 KiB
Markdown
27 lines
1.2 KiB
Markdown
# ReImmich
|
|
|
|
i had a very funny edge case, after a disaster:
|
|
- the volume containing my immich's library (i.e. the photos) was intact
|
|
- the volume and any replicas (all 6 across 2 servers!!!) of the database was corrupted
|
|
|
|
after some painful manual re-importing of the images themselves through immich-go, the main thing i was still missing were albums
|
|
|
|
i discovered that the immich mobile app lets you export its sqlite db, which just happens to contain a cached copy of all albums and their contents
|
|
|
|
this funny script takes that sqlite db and restores the albums from it as best it can
|
|
|
|
## how to
|
|
|
|
1. get an immich api key (i just used an all perms one; `asset.read`, `album.create`, `album.update` should suffice)
|
|
2. export the sqlite db from the mobile app (settings -> sync status -> export database)
|
|
3. put the sqlite db somewhere under this directory (`priv/` is a good place)
|
|
4. create `config/config.exs` with the things you just gathered:
|
|
```ex
|
|
import Config
|
|
|
|
config :reimmich,
|
|
db: "priv/immich_export_XXXXXXXXXXXX.sqlite",
|
|
url: "https://immich.example.com",
|
|
api_key: "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
|
|
```
|
|
5. run `mix run -e 'Reimmich.match'` and pray
|