v1.6.402 — one-command photo library rescue (restore-immich)
Posted by tomspark
Immich problems are the 1 issue we see across the fleet, and the painful version is always the same: the photo database breaks, and it LOOKS like your photos are gone. They almost never are — the photos sit safely on your drive; it's the app's database that got hurt. So Tom prioritized a rescue command. If Immich breaks, run: sudo sparkbox restore-immich It restores the photo database from your latest SparkBox backup — albums, faces, and accounts come back. Your photos and videos on disk are never touched, it saves a safety copy of the current database first, and if it can't restore safely it changes nothing and tells you why. Also in this update: command-line backups now capture the same consistent database snapshots dashboard backups do, a bug where "sparkbox backup" could quit silently on some setups is fixed, and the Fleet Map's battle lasers no longer cover half the screen in a close fight. Update from your dashboard, or: sudo sparkbox update
3 replies
DjunaBug wrote:
I'm glad to hear you're actively working on Immich :) Please see my post here: https://demox.world/post/keep-the-immich-db-at-sb-root-not-the-hdd-where-i-moved-sb-data-dir-29873 I'm just setting up Immich and noticed that its DB appears to live on the HDD where I migrated SBDATADIR and MEDIAROOT, whereas Immich recommends running the DB on SSD: Good performance and a stable connection to the Postgres database is critical to a smooth Immich experience. The Postgres database files are typically between 1-3 GB in size. For this reason, the Postgres database (DBDATALOCATION) should ideally use local SSD storage, and never a network share of any kind. (https://docs.immich.app/install/requirements) Is it possible the issues some folks are experiencing could be linked to timeouts or some such running the DB on HDDs?
DjunaBug wrote:
Browsing further on the Immich site I see this... The location where your uploaded files are stored UPLOADLOCATION=./library The location where your database files are stored. Network shares are not supported for the database DBDATALOCATION=./postgres https://docs.immich.app/install/docker-compose
Chris wrote:
Great eye, Djuna, and good news: your photos and your database are both safe. That 'network shares are not supported' warning is specifically about pointing the database at an SMB or NFS share mounted from another machine over the network. A regular hard drive sitting inside your NAS doesn't count as a network share, so Immich is perfectly happy running there. It just works a little slower than it would on the NVMe. Your idea to keep the database on the fast SSD is already logged with Tom from your other post, so there's nothing else you need to do here.