repopulate lost database

hey yall, today i did a blunder and rebooted the server that hosts my immich instance (i'm running from docker-compose). The database volumes are by default not marked as external, thus they were deleted by docker. Now, all photos are still there in the file system, but the database is gone. Is there any hope for me, other than creating a new account and doing the import again?
4 Replies
bo0tzz
bo0tzz3y ago
A reboot shouldn't cause your database volume to be deleted, are you certain it's gone? If it is, then you'll need to reimport indeed
mryakobo
mryakoboOP3y ago
output of docker volume inspect immich_pgdata
[
{
"CreatedAt": "2023-04-24T12:18:02+02:00",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "immich",
"com.docker.compose.version": "2.17.2",
"com.docker.compose.volume": "pgdata"
},
"Mountpoint": "/home/jakob/docker-data-root/volumes/immich_pgdata/_data",
"Name": "immich_pgdata",
"Options": null,
"Scope": "local"
}
]
[
{
"CreatedAt": "2023-04-24T12:18:02+02:00",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "immich",
"com.docker.compose.version": "2.17.2",
"com.docker.compose.volume": "pgdata"
},
"Mountpoint": "/home/jakob/docker-data-root/volumes/immich_pgdata/_data",
"Name": "immich_pgdata",
"Options": null,
"Scope": "local"
}
]
I've had this server running Immich for about 5 weeks, have been updating it with docker-compose pull and such. external: true might be a thing to look into. Or, just using folder mounts instead of volumes in the default docker-compose.yml file
bo0tzz
bo0tzz3y ago
Looks OK, no?
mryakobo
mryakoboOP3y ago
hm. I might have figured it out now. My /partition was running out of space, thus I changed /etc/docker/daemon.json to point to my /home instead; but apparently forgot to copy the data files. Silly mistake... sorry for the confusion!!!! Although on a more serious note, I from this second on hate docker volumes, they are too magic for me

Did you find this page helpful?