Ohboy. Tonight I:

  • installed a cool docker monitoring app called dockge
  • started moving docker compose files from random other folders into one centralized place (/opt/dockers if that matters)
  • got to immich, brought the container down
  • moved the docker-compose.yml into my new folder
  • docker compose up -d
  • saw errors saying it didn’t have a DB name to work with, so it created a new database

panik

  • docker compose down
  • copy old .env file from the old directory into the new folder!
  • hold breath
  • docker compose up -d

Welcome to Immich! Let’s get started…

Awwwwww, crud.

Anything I can do at this point?

No immich DB backup but I do have the images themselves.

EDIT: Thanks to u/atzanteol I figured out that changing the folder name caused this too. I changed the docker folder’s name back to the original name and got my DB back! yay

  • pe1uca@lemmy.pe1uca.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 years ago

    Glad to see you solved the issue, I just want to point out that this might happen again if you forget your db is in a volume controlled by docker, better to put it in a folder you know.

    Last month immich released an update to the compose file for this, you need to manually change some part.
    Here’s the post in this community https://lemmy.ml/post/14671585

    Also I’ll include you this link in the same post, I moved the data from the docker volume to my specific one without issue.
    https://lemmy.pe1uca.dev/comment/2546192

    Or maybe another option is to make backups of the db. I saw this project some time ago, haven’t implemented it on my services, but it looks interesting.
    https://github.com/prodrigestivill/docker-postgres-backup-local

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 years ago

    Docker compose has a default “feature” of prefixing the names of things it creates with the name of the directory the yml is in. It could be that the name of your volume changed as a result of you moving the yml to a new folder. The old one should still be there.

    docker volume ls