Recovering from an old database
Hi,
I recently set up the immich server (using docker) and its awesome. I loved it so much that, I uploaded my 50GBish worth of photos and spent time arranging them into Albums. But at a later time (few days later), for some reason my docker daemon stopped responding and I had to uninstall docker and reinstall it to get working.
After reinstalling docker and setting up the immich containers once again, I realized that the new server has none of the photos and new administrator/user has new unique id which was different from the old one and all the photos were gone. Renaming the old photos directory with new id didn't help either.
So, my guess is that immich stores the information about the photos in a separate format (I'm assuming some kind of database) independently of photos and my albums are probably gone for good π¦
But is there a way to reuse my old directory with photos instead of re uploading the entire 50 GB of photos again?
Also as an different question, is there a way to back up the albums (and the metadata?) information independently?
I'm new to whole self-hosting thing, so I aplogize if I am missing something obvious.
12 Replies
Your photos should still be in the mounted folder that you use for UPLOAD_LOCATION
And from running a new instance the database of the old instance has lost
So you will have to reupload those photos, you can use the CLI tool to import and use local IP
You can backup the database directory that mounted in the docker file system
Or better yet. Backup your whole VM βΊοΈ
Of course backup strategy depends on how your system is setup. Maybe give us some more info and we can point you to some options
I assumed so..
You mean this tool?
GitHub
GitHub - immich-app/CLI: CLI utilities for Immich to help with uplo...
CLI utilities for Immich to help with upload images and videos from a location on a desktop machine or a server to the Immich's server - GitHub - immich-app/CLI: CLI utilities for Immich to...
Thats the folder I attempted renaming to the new user ID (the unique string), which didn't work. So I'm assuming there is no work around except a complete reupload?
Currently docker instances are running on an old pc I use as a server(Ubunutu server edition). My UPLOAD_LOCATION was on the hardisk (which is the same location for the new one too). How do one back up the databases inside the containers? Also what do you mean backup the whole VM?
Is there some specific information you need?
your description above is fine
I was thinking that you are running Immich in a VM on a hypervisor platform
but you are running it in the baremetal setup, which is fine
you can do
docker volume ls
to list out all the availalbe docker volume on your machine
then perform docker volume inspect <postgresql-data-volume-name>
and you will see the path where the database is store. Backing up that directory would be a good way to goThanks.....I will keep that in mind.....I'm new to docker and I tend to have a way of breaking docker containers...This should at least save me from having to do this all again if I mess up
I just try the tool to reupload my photos from the old instance (approx 16000 files).....I made the mistake of not excluding the thumbnails folder, so had to clean up those afterwards
But still some of the dates seem to have been messed up
In particular I got photos from November of 1899 apparently
Also number of files doesn't seem to match.
I have decided to do it manually for now
Just to clarify, the first instance I set up had no issues. But photos where uploaded manually
Hmm
it should be corrected if the file metadata is correct
Those are really old photos....so may not have EXIF data required....don't explain how immich figured out the date initially though
Nevertheless, there are files missing still
I will do it manually
and hopefully for the last time
thank you for your help
from the creation date of the file as the fall back
if that piece of info is mess up too then it will show strange date like what you observed
I guessed so.....Just out of curiousity....why the date 1899?
29-11-1899 to be precise
π€·
fair enough π