ITADN

[ISSUE v2.7.5] Unable to restore database from backup

#29582ClosedTalhamehar007 创建于 2026-07-04
T
Talhamehar007commented
### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug Clean Fresh install and I am unable to restore database: `Error: /usr/lib/postgresql/14/bin/psql non-zero exit code (2) server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. ERROR: could not extend file "base/16384/18885": No space left on device HINT: Check free disk space. CONTEXT: COPY face_search, line 60665 WARNING: terminating connection because of crash of another server process DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. HINT: In a moment you should be able to reconnect to the database and repeat your command. no connection to the server connection to server was lost` ** > PS: The disk space is `NOT` full, I have 200 GB free space inside docker. ** ```bash docker exec immich_postgres df -h Filesystem Size Used Avail Use% Mounted on overlay 197G 22G 166G 12% / tmpfs 64M 0 64M 0% /dev shm 64M 28K 64M 1% /dev/shm /dev/vdb1 197G 22G 166G 12% /etc/hosts /dev/root 19G 17G 1.6G 92% /var/lib/postgresql/data tmpfs 7.8G 0 7.8G 0% /proc/acpi tmpfs 7.8G 0 7.8G 0% /proc/scsi tmpfs 7.8G 0 7.8G 0% /sys/firmware ╭─   /Volumes/T7_Sheild/immich-server ···················· ``` ### The OS that Immich Server is running on macOS with Colima as docker backend ### Version of Immich Server v2.7.5 ### Version of Immich Mobile App NA ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Device make and model NA ### Your docker-compose.yml content ```YAML # # WARNING: Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. # name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/data - ${ENCODED_VIDEO_LOCATION}:/data/encoded-video env_file: - .env ports: - "2283:2283" depends_on: - redis - database restart: always healthcheck: disable: false environment: - TZ=Europe/London - LOG_LEVEL=verbose #cpuset: "0-4" # ⬅ limit Immich server to 5 CPU cores immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - .env restart: always cpus: 4.0 healthcheck: disable: false redis: container_name: immich_redis image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8 healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_postgres image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: "--data-checksums" volumes: # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file - ${DB_DATA_LOCATION}:/var/lib/postgresql/data healthcheck: test: >- pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 interval: 5m start_interval: 30s start_period: 5m command: >- postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on restart: always cpus: 3.0 power-tools: container_name: immich_power_tools image: ghcr.io/varun-raj/immich-power-tools:latest ports: - "8901:3000" env_file: - .env # immich-prometheus: # container_name: immich_prometheus # ports: # # this exposes the default port for Prometheus so you can interact with it # - 2285:9090 # image: prom/prometheus # volumes: # # the Prometheus configuration file - a barebones one is provided to get started # - ./prometheus.yml:/etc/prometheus/prometheus.yml # # a named volume defined in the bottom of the Compose file; it can also be a mounted folder # - ./prometheus-data:/prometheus # immich-grafana: # container_name: immich_grafana # command: ["./run.sh", "-disable-reporting"] # this is to disable Grafana's telemetry # ports: # - 2284:3000 # image: grafana/grafana # volumes: # # stores your pretty dashboards and panels # - ./grafana-data:/var/lib/grafana # databasus: # container_name: databasus # image: databasus/databasus:latest # ports: # - "4005:4005" # volumes: # - ./databasus-data:/databasus-data # restart: unless-stopped volumes: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables LOG_LEVEL=debug # The location where your uploaded files are stored UPLOAD_LOCATION=./library # The location where your database files are stored DB_DATA_LOCATION=./database # NEW LOCATOION FOR ENCODED VIDEOS, you can change this to a different location if you want to store them separately from the uploaded files ENCODED_VIDEO_LOCATION="/Volumes/990Pro/abu/.immich-server/library/encoded-video" # To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List # TZ=Europe/London # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=v2.7.5 # Connection secret for postgres. You should change it to a random password # Please use only the characters `A-Za-z0-9`, without special characters or spaces DB_PASSWORD=********** # Prefer the classic downloader (bypasses Xet CAS, fixes your errors) HF_HUB_DISABLE_XET=1 # (Optional alternative to try *instead* of the line above; don’t use both) # HF_HUB_ENABLE_HF_TRANSFER=1 # The values below this line do not need to be changed ################################################################################### DB_USERNAME=abutalha DB_DATABASE_NAME=immich # Enable Metrics IMMICH_TELEMETRY_INCLUDE=all ###################### Machine Learning VARS to keep model active all time ################################### # --- Keep models always loaded --- MACHINE_LEARNING_MODEL_TTL=0 MACHINE_LEARNING_MODEL_TTL_POLL_S=0 # --- Preload Models at startup --- MACHINE_LEARNING_PRELOAD__CLIP__VISUAL=ViT-SO400M-16-SigLIP2-384__webli MACHINE_LEARNING_PRELOAD__CLIP__TEXTUAL=ViT-SO400M-16-SigLIP2-384__webli # IMMMICH_POWER_TOOLS # These Values Below are related to immich-power-tools, remove these if you are removing that container: ####################################################################################################### IMMICH_API_KEY=************** IMMICH_URL="http://immich-server:2283" # Your immich instace ip address and port EXTERNAL_IMMICH_URL="http://localhost:2283" # External address of immich DB_PORT="5432" DB_HOST="immich_postgres" # SAME AS ABOVE (Original IMMICH .env file), COMMENTED OUT FOR DEDUPLICATION, Remove Comment if seperate .env file # DB_USERNAME=abutalha # DB_DATABASE_NAME=immich # DB_PASSWORD=********** # END OF IMMMICH_POWER_TOOLS SECTION ####################################################################################################### ``` ### Reproduction steps 1. Use my `docker-compose.yaml `file and `.env `file 2. `docker compose up -d` 3. Restore a previous version of database from webui `immich-db-backup-20260702T150000-v2.7.5-pg14.10.sql.gz` 4. WebUI and docker compose logs throw and error ... ### Relevant log output ```shell See below: ``` ### Additional information FULL LOGS FILE: `docker compose logs > logs.txt` [logs.txt](https://github.com/user-attachments/files/29665827/logs.txt)
关闭于 2026-07-04 1 条评论