Restoring Immich From Backup

Hello, I am currently attempting to restore immich from a backup, but running into some issues with some of the restore commands not working.
61 Replies
Immich
Immich2w ago
:wave: Hey @Nathan Hoffman, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
Nathan Hoffman
Nathan HoffmanOP2w ago
I am restoring from an older big-bear backup into the latest version of immich. I have both my database file and my upload folder contents
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
# Check the database user if you deviated from the default
gunzip --stdout "/path/to/backup/dump.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i immich_postgres psql --dbname=postgres --username=<DB_USERNAME> # Restore Backup
docker compose up -d # Start remainder of Immich apps
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
# Check the database user if you deviated from the default
gunzip --stdout "/path/to/backup/dump.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i immich_postgres psql --dbname=postgres --username=<DB_USERNAME> # Restore Backup
docker compose up -d # Start remainder of Immich apps
I have no issue getting up to docker compose create, but after that point, I don't think the commands are working properally
Immich
Immich2w ago
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Nathan Hoffman
Nathan HoffmanOP2w ago
im just restarting from scratch real quick and will send the results to all of the commands. I am running all commands in /var/lib/casaos/apps/immich because that's where my compose is Docker compose down -v
WARN[0000] The "user" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
[+] Running 5/5
✔ Container immich-server Removed 1.1s
✔ Container immich-machine-learning Removed 1.1s
✔ Container immich-postgres Removed 6.2s
✔ Container immich-redis Removed 1.1s
✔ Network immich Removed
WARN[0000] The "user" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
[+] Running 5/5
✔ Container immich-server Removed 1.1s
✔ Container immich-machine-learning Removed 1.1s
✔ Container immich-postgres Removed 6.2s
✔ Container immich-redis Removed 1.1s
✔ Network immich Removed
rm -rf /DATA/AppData/immich/pgdata - worked docker compose pull
WARN[0000] The "user" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
[+] Pulling 4/4
✔ immich-machine-learning Pulled 1.1s
✔ immich-server Pulled 1.1s
✔ database Pulled 0.7s
✔ redis Pulled
WARN[0000] The "user" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
[+] Pulling 4/4
✔ immich-machine-learning Pulled 1.1s
✔ immich-server Pulled 1.1s
✔ database Pulled 0.7s
✔ redis Pulled
docker compose create
WARN[0000] The "user" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
[+] Creating 5/5
✔ Network immich Created 0.2s
✔ Container immich-redis Created 1.6s
✔ Container immich-postgres Created 1.6s
✔ Container immich-machine-learning Created 1.6s
✔ Container immich-server Created
WARN[0000] The "user" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
[+] Creating 5/5
✔ Network immich Created 0.2s
✔ Container immich-redis Created 1.6s
✔ Container immich-postgres Created 1.6s
✔ Container immich-machine-learning Created 1.6s
✔ Container immich-server Created
here is the first issue when I do docker start immich-postgres, it just constantly shows as starting in portrainer when I look at the logs this is what happened
The files belonging to this database system will be owned by user "postgres".

This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".

The default database encoding has accordingly been set to "UTF8".

The default text search configuration will be set to "english".

Data page checksums are enabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok

creating subdirectories ... ok

selecting dynamic shared memory implementation ... posix

selecting default max_connections ... 100

selecting default shared_buffers ... 128MB

selecting default time zone ... Etc/UTC

creating configuration files ... ok

running bootstrap script ... ok

performing post-bootstrap initialization ... ok

syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections

You can change this by editing pg_hba.conf or using the option -A, or

--auth-local and --auth-host, the next time you run initdb.

waiting for server to start....2025-04-18 15:48:48.132 UTC [56] LOG: redirecting log output to logging collector process

2025-04-18 15:48:48.132 UTC [56] HINT: Future log output will appear in directory "log".

done

server started

CREATE DATABASE

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

waiting for server to shut down.... done

server stopped

PostgreSQL init process complete; ready for start up.

2025-04-18 15:49:06.967 UTC [1] LOG: redirecting log output to logging collector process

2025-04-18 15:49:06.967 UTC [1] HINT: Future log output will appear in directory "log".
The files belonging to this database system will be owned by user "postgres".

This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".

The default database encoding has accordingly been set to "UTF8".

The default text search configuration will be set to "english".

Data page checksums are enabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok

creating subdirectories ... ok

selecting dynamic shared memory implementation ... posix

selecting default max_connections ... 100

selecting default shared_buffers ... 128MB

selecting default time zone ... Etc/UTC

creating configuration files ... ok

running bootstrap script ... ok

performing post-bootstrap initialization ... ok

syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections

You can change this by editing pg_hba.conf or using the option -A, or

--auth-local and --auth-host, the next time you run initdb.

waiting for server to start....2025-04-18 15:48:48.132 UTC [56] LOG: redirecting log output to logging collector process

2025-04-18 15:48:48.132 UTC [56] HINT: Future log output will appear in directory "log".

done

server started

CREATE DATABASE

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

waiting for server to shut down.... done

server stopped

PostgreSQL init process complete; ready for start up.

2025-04-18 15:49:06.967 UTC [1] LOG: redirecting log output to logging collector process

2025-04-18 15:49:06.967 UTC [1] HINT: Future log output will appear in directory "log".
is this an issue or normal since I deleted the database file in pgdata @Mraedis would you mind helping out I believe you are knowledgable on casa right?
bo0tzz
bo0tzz2w ago
No need to ping specific people, plenty of us can help Does the database shut down every time or was it just once? I don't entirely understand what the issue is
Nathan Hoffman
Nathan HoffmanOP2w ago
every time I stop/start immich-postgres but nothing changes and the status changes to unhealthy not starting
bo0tzz
bo0tzz2w ago
What does docker compose ps output? Also check the log folder inside the postgres data dir, that should have more database logs
Nathan Hoffman
Nathan HoffmanOP2w ago
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "user" variable is not set. Defaulting to a blank string.
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
immich-postgres docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52 "docker-entrypoint.s…" database 34 minutes ago Up 3 minutes (health: starting) 5432/tcp
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "Chksum" variable is not set. Defaulting to a blank string.
WARN[0000] The "user" variable is not set. Defaulting to a blank string.
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
immich-postgres docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52 "docker-entrypoint.s…" database 34 minutes ago Up 3 minutes (health: starting) 5432/tcp
first log is this
2025-04-18 15:48:48.132 UTC [56] LOG: starting PostgreSQL 14.17 (Debian 14.17-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-04-18 15:48:48.194 UTC [56] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-04-18 15:48:48.391 UTC [58] LOG: database system was shut down at 2025-04-18 15:48:13 UTC
2025-04-18 15:48:48.510 UTC [56] LOG: database system is ready to accept connections
2025-04-18 15:49:06.250 UTC [56] LOG: received fast shutdown request
2025-04-18 15:49:06.324 UTC [56] LOG: aborting any active transactions
2025-04-18 15:49:06.326 UTC [56] LOG: background worker "logical replication launcher" (PID 67) exited with exit code 1
2025-04-18 15:49:06.329 UTC [62] LOG: shutting down
2025-04-18 15:49:06.666 UTC [56] LOG: database system is shut down
2025-04-18 15:48:48.132 UTC [56] LOG: starting PostgreSQL 14.17 (Debian 14.17-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-04-18 15:48:48.194 UTC [56] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-04-18 15:48:48.391 UTC [58] LOG: database system was shut down at 2025-04-18 15:48:13 UTC
2025-04-18 15:48:48.510 UTC [56] LOG: database system is ready to accept connections
2025-04-18 15:49:06.250 UTC [56] LOG: received fast shutdown request
2025-04-18 15:49:06.324 UTC [56] LOG: aborting any active transactions
2025-04-18 15:49:06.326 UTC [56] LOG: background worker "logical replication launcher" (PID 67) exited with exit code 1
2025-04-18 15:49:06.329 UTC [62] LOG: shutting down
2025-04-18 15:49:06.666 UTC [56] LOG: database system is shut down
second and 3rd log files are identical and this
2025-04-18 15:49:06.967 UTC [1] LOG: starting PostgreSQL 14.17 (Debian 14.17-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-04-18 15:49:06.968 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-04-18 15:49:06.968 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-04-18 15:49:07.090 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-04-18 15:49:07.276 UTC [76] LOG: database system was shut down at 2025-04-18 15:49:06 UTC
2025-04-18 15:49:07.347 UTC [1] LOG: database system is ready to accept connections
2025-04-18 16:18:19.320 UTC [1] LOG: received fast shutdown request
2025-04-18 16:18:19.379 UTC [1] LOG: aborting any active transactions
2025-04-18 16:18:19.383 UTC [1] LOG: background worker "logical replication launcher" (PID 85) exited with exit code 1
2025-04-18 16:18:19.384 UTC [80] LOG: shutting down
2025-04-18 16:18:19.666 UTC [1] LOG: database system is shut down
2025-04-18 15:49:06.967 UTC [1] LOG: starting PostgreSQL 14.17 (Debian 14.17-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-04-18 15:49:06.968 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-04-18 15:49:06.968 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-04-18 15:49:07.090 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-04-18 15:49:07.276 UTC [76] LOG: database system was shut down at 2025-04-18 15:49:06 UTC
2025-04-18 15:49:07.347 UTC [1] LOG: database system is ready to accept connections
2025-04-18 16:18:19.320 UTC [1] LOG: received fast shutdown request
2025-04-18 16:18:19.379 UTC [1] LOG: aborting any active transactions
2025-04-18 16:18:19.383 UTC [1] LOG: background worker "logical replication launcher" (PID 85) exited with exit code 1
2025-04-18 16:18:19.384 UTC [80] LOG: shutting down
2025-04-18 16:18:19.666 UTC [1] LOG: database system is shut down
bo0tzz
bo0tzz2w ago
Strange Can you post your compose and .env?
Nathan Hoffman
Nathan HoffmanOP2w ago
ok
Nathan Hoffman
Nathan HoffmanOP2w ago
Nathan Hoffman
Nathan HoffmanOP2w ago
where can I find the env?
Zeus
Zeus2w ago
The healthcheck for your immich Postgres is missing the second $ signs
Nathan Hoffman
Nathan HoffmanOP2w ago
ok I ive done up to the step where it says Populate the .env file with custom values what should I do how do I fix this
Zeus
Zeus2w ago
You can probably do the pull and create next
Nathan Hoffman
Nathan HoffmanOP2w ago
ok even though I already have immich installed I should do it again? finished pulling finished creating
✔ Network immich_default Created 0.2s
✔ Volume "immich_model-cache" Created 0.1s
✔ Container immich-postgres Recreated 4.2s
✔ Container immich-redis Recreated 2.5s
✔ Container immich-machine-learning Recreated 2.5s
✔ Container immich-server Recreated
✔ Network immich_default Created 0.2s
✔ Volume "immich_model-cache" Created 0.1s
✔ Container immich-postgres Recreated 4.2s
✔ Container immich-redis Recreated 2.5s
✔ Container immich-machine-learning Recreated 2.5s
✔ Container immich-server Recreated
also did this change the location of my docker compose
Zeus
Zeus2w ago
Uh that’s up to you Your first compose was broken so that’s why Postgres wasn’t healthy
Nathan Hoffman
Nathan HoffmanOP2w ago
ok so now it should be healthy and I can continue with restore? this command
sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g"
sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g"
just sits there and doesnt really do anything, ive waited very long am I suppost to run some of the commands in the docker container and not in the cmd line
Zeus
Zeus2w ago
That’s not a command by itself. You’re missing characters from the instructions to turn it into one line It should go between the gunzip and the docker exec
Nathan Hoffman
Nathan HoffmanOP2w ago
ahh I just ran all three together and it worked is it dangerous to start all of my containers before I move over the upload folder?
Zeus
Zeus2w ago
It’s not dangerous but it will refuse to start
Nathan Hoffman
Nathan HoffmanOP2w ago
ok, because last time it worked and I saw all of my pictures, except I couldn't actually see them just like the database info
Zeus
Zeus2w ago
Hm. That would surprise me if it started at all
Nathan Hoffman
Nathan HoffmanOP2w ago
ok last question when im uploading my backup, I have 5 files. encoded video, thumbs, profile, library, and upload do they all go into my /immich directory or should I put them all inside of /immich/upload
Zeus
Zeus2w ago
What’s your upload location. Set to
Nathan Hoffman
Nathan HoffmanOP2w ago
./library
Zeus
Zeus2w ago
The 5 folders should go into that folder then
Nathan Hoffman
Nathan HoffmanOP2w ago
ok but im not exactly sure where that is would it just be in root?
Zeus
Zeus2w ago
Uh, it’s wherever your compose file is I guess. You can start the stack and it should at least make the library folder
Nathan Hoffman
Nathan HoffmanOP2w ago
ok, I will try that, but that's not how my setup had used to work since on casa compose files are inside var/lib/casaos/apps/immich
Zeus
Zeus2w ago
You can set upload_location to wherever those folders are now
Nathan Hoffman
Nathan HoffmanOP2w ago
just like the full path anywhere on the system?
Zeus
Zeus2w ago
Mhm
Nathan Hoffman
Nathan HoffmanOP2w ago
ok thanks finished moving upload folder, getting this error in immich-server
}

[Nest] 6 - 04/18/2025, 10:44:19 PM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}

[Nest] 6 - 04/18/2025, 10:44:19 PM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'

microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."

at StorageService.verifyReadAccess (/usr/src/app/dist/services/storage.service.js:84:19)

at async /usr/src/app/dist/services/storage.service.js:38:21

at async /usr/src/app/dist/repositories/database.repository.js:231:27

at async /usr/src/app/node_modules/kysely/dist/cjs/kysely.js:413:20

at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)

at async /usr/src/app/dist/repositories/database.repository.js:228:13

microservices worker exited with code 1

Killing api process
}

[Nest] 6 - 04/18/2025, 10:44:19 PM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}

[Nest] 6 - 04/18/2025, 10:44:19 PM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'

microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."

at StorageService.verifyReadAccess (/usr/src/app/dist/services/storage.service.js:84:19)

at async /usr/src/app/dist/services/storage.service.js:38:21

at async /usr/src/app/dist/repositories/database.repository.js:231:27

at async /usr/src/app/node_modules/kysely/dist/cjs/kysely.js:413:20

at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)

at async /usr/src/app/dist/repositories/database.repository.js:228:13

microservices worker exited with code 1

Killing api process
and now cannot access the webserver.
Zeus
Zeus2w ago
you have not moved the files back to the correct location
Nathan Hoffman
Nathan HoffmanOP2w ago
All of my files have been uploaded to /immich-app/library Is that not where they’re supposed to be I figured it had to be since it auto generated the “library folder” on start up currently testing what happens if i just ignore mount checks it worked I guess a permenant solution would just be manually creating .immich files
bo0tzz
bo0tzz2w ago
You should only do either of those things if you're absolutely certain all the files are where they should be If not, you will probably lose data
Nathan Hoffman
Nathan HoffmanOP2w ago
right now everything works as normal, I can upload, download and see my entier library so is it safe to proceed?
bo0tzz
bo0tzz2w ago
Well, are you absolutely certain everything is where it should be?
Nathan Hoffman
Nathan HoffmanOP2w ago
considering it works, yes
bo0tzz
bo0tzz2w ago
But you said you're ignoring the mount checks, right? That'd be why it works
Nathan Hoffman
Nathan HoffmanOP2w ago
right but if I can upload/download, and see all content, then wouldn't everything need to be in the right place, otherwise, wouldn't the functionality break the only probelm I noticed is during large upload chucks, the immich-server container will periodically crash and come back online which is slightly annoying here is the error I get when that happens
node:events:496

throw er; // Unhandled 'error' event

^

Error: Unexpected end of form

at Multipart._final (/usr/src/app/node_modules/busboy/lib/types/multipart.js:588:17)

at prefinish (node:internal/streams/writable:916:14)

at finishMaybe (node:internal/streams/writable:930:5)

at Writable.end (node:internal/streams/writable:845:5)

at IncomingMessage.onend (node:internal/streams/readable:948:10)

at Object.onceWrapper (node:events:632:28)

at IncomingMessage.emit (node:events:518:28)

at endReadableNT (node:internal/streams/readable:1698:12)

at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

Emitted 'error' event on Multipart instance at:

at emitErrorNT (node:internal/streams/destroy:170:8)

at emitErrorCloseNT (node:internal/streams/destroy:129:3)

at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {

storageErrors: []

}

Node.js v22.14.0

api worker exited with code 1

Initializing Immich v1.131.3

Detected CPU Cores: 4
node:events:496

throw er; // Unhandled 'error' event

^

Error: Unexpected end of form

at Multipart._final (/usr/src/app/node_modules/busboy/lib/types/multipart.js:588:17)

at prefinish (node:internal/streams/writable:916:14)

at finishMaybe (node:internal/streams/writable:930:5)

at Writable.end (node:internal/streams/writable:845:5)

at IncomingMessage.onend (node:internal/streams/readable:948:10)

at Object.onceWrapper (node:events:632:28)

at IncomingMessage.emit (node:events:518:28)

at endReadableNT (node:internal/streams/readable:1698:12)

at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

Emitted 'error' event on Multipart instance at:

at emitErrorNT (node:internal/streams/destroy:170:8)

at emitErrorCloseNT (node:internal/streams/destroy:129:3)

at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {

storageErrors: []

}

Node.js v22.14.0

api worker exited with code 1

Initializing Immich v1.131.3

Detected CPU Cores: 4
im not exactly sure what can be done to make the .immich file checks work, but do you think that these two issues could be related?
Zeus
Zeus2w ago
To reiterate, needing to set that env var itself means your install is broken. We do not help debug installs with that enabled I recommend looking into the folders, specifically the encoded video folder and post the contents of each folder here for further checking
Nathan Hoffman
Nathan HoffmanOP2w ago
ok would it be easier if I just sent the tree?
/immich-app/
├── docker-compose.yml
├── library
│   ├── backups
│   ├── encoded-video
│   │   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3
│   │   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9
│   │   ├── af4c5dd7-b430-450e-8ff2-666299c67af1
│   │   └── b60ae4e7-289d-4627-81e9-a90c6b36a680
│   ├── library
│   ├── profile
│   │   └── af4c5dd7-b430-450e-8ff2-666299c67af1
│   ├── thumbs
│   │   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3
│   │   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9
│   │   ├── af4c5dd7-b430-450e-8ff2-666299c67af1
│   │   └── b60ae4e7-289d-4627-81e9-a90c6b36a680
│   └── upload
│   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3
│   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9
│   ├── af4c5dd7-b430-450e-8ff2-666299c67af1
│   └── b60ae4e7-289d-4627-81e9-a90c6b36a680
└── postgres [error opening dir]
/immich-app/
├── docker-compose.yml
├── library
│   ├── backups
│   ├── encoded-video
│   │   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3
│   │   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9
│   │   ├── af4c5dd7-b430-450e-8ff2-666299c67af1
│   │   └── b60ae4e7-289d-4627-81e9-a90c6b36a680
│   ├── library
│   ├── profile
│   │   └── af4c5dd7-b430-450e-8ff2-666299c67af1
│   ├── thumbs
│   │   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3
│   │   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9
│   │   ├── af4c5dd7-b430-450e-8ff2-666299c67af1
│   │   └── b60ae4e7-289d-4627-81e9-a90c6b36a680
│   └── upload
│   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3
│   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9
│   ├── af4c5dd7-b430-450e-8ff2-666299c67af1
│   └── b60ae4e7-289d-4627-81e9-a90c6b36a680
└── postgres [error opening dir]
Zeus
Zeus2w ago
Can you use -a ? To show hidden files
Nathan Hoffman
Nathan HoffmanOP2w ago
/immich-app/ ├── docker-compose.yml ├── .env ├── library │   ├── backups │   │   └── .immich │   ├── encoded-video │   │   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3 │   │   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9 │   │   ├── af4c5dd7-b430-450e-8ff2-666299c67af1 │   │   ├── b60ae4e7-289d-4627-81e9-a90c6b36a680 │   │   └── .immich │   ├── library │   ├── profile │   │   └── af4c5dd7-b430-450e-8ff2-666299c67af1 │   ├── thumbs │   │   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3 │   │   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9 │   │   ├── af4c5dd7-b430-450e-8ff2-666299c67af1 │   │   └── b60ae4e7-289d-4627-81e9-a90c6b36a680 │   └── upload │   ├── 13b14327-430f-4cd3-9f54-64f1157edcb3 │   ├── 1f992bb2-1a87-460c-84ad-acdc66a344b9 │   ├── af4c5dd7-b430-450e-8ff2-666299c67af1 │   └── b60ae4e7-289d-4627-81e9-a90c6b36a680 └── postgres [error opening dir] I believe I manually created the .immich file in encoded video not the one in backups though
Zeus
Zeus2w ago
You have a lot of hidden files missing How did you move the folders?
Nathan Hoffman
Nathan HoffmanOP2w ago
I just uploaded them via winSCP using only new/updated files
Zeus
Zeus2w ago
Oh I’m thinking that skips hidden files the.
Nathan Hoffman
Nathan HoffmanOP2w ago
so schould I just go ahead and manually create them
Zeus
Zeus2w ago
I guess if all is working well I would make the .immich file in each folder I don’t think we have any other hidden files in immich
Nathan Hoffman
Nathan HoffmanOP2w ago
ok
Zeus
Zeus2w ago
The Postgres folder may be concerning But I guess if the DB is running fine it’s ok
Nathan Hoffman
Nathan HoffmanOP2w ago
it could just be that it's currently being written to or something as im backing up two phones at the moment but one other concern i have is that immich auto generated the /library file inside of the pre-existing one is it possible that my folders are actually suppost to me in immich-app/library/library
Zeus
Zeus2w ago
That’s normal
Nathan Hoffman
Nathan HoffmanOP2w ago
ok thx
Zeus
Zeus2w ago
If you enable the storage template the files wi go in library/library I wouldn’t use win SCP for anything like this in the future Use rsync
Nathan Hoffman
Nathan HoffmanOP2w ago
ok thanks I'm going to wait for the phones to finish backing up but later tonight I will add .immich files to the folders and remove the ignore .immich checks env variable then update with what happens thanks for the hlep still not sure why server periodically crashes during uploads though
Zeus
Zeus2w ago
What’s the specs
Nathan Hoffman
Nathan HoffmanOP2w ago
Of the server? It’s running like an i5 and 12gb of ram with 2hhds

Did you find this page helpful?