1.2 KiB
1.2 KiB
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
- get an immich api key (i just used an all perms one;
asset.read,album.create,album.updateshould suffice) - export the sqlite db from the mobile app (settings -> sync status -> export database)
- put the sqlite db somewhere under this directory (
priv/is a good place) - create
config/config.exswith the things you just gathered:
import Config
config :reimmich,
db: "priv/immich_export_XXXXXXXXXXXX.sqlite",
url: "https://immich.example.com",
api_key: "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
- run
mix run -e 'Reimmich.match'and pray