immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
48.94k stars 2.57k forks source link

backup "remainder" calculation is wrong #11366

Open rithask opened 2 months ago

rithask commented 2 months ago

The bug

the number of remaining photos to backup is shown wrong. is it because of the hidden/deleted photos in the iOS app? if i selected some unbackuped photos/videos, the remainder still shows 0. is there a workaround?

image

The OS that Immich Server is running on

Ubuntu 22.04.4 LTS

Version of Immich Server

v1.109.2

Version of Immich Mobile App

v1.109.2

Platform with the issue

Your docker-compose.yml content

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always
    networks:
      - common
    environment:
      - VIRTUAL_HOST=immich.neb.rithask.win
      - VIRTUAL_PORT=2283
  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    networks:
      - common
  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:d6c2911ac51b289db208767581a5d154544f2b2fe4914ea5056443f62dc6e900
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always
    networks:
      - common
  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --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
    networks:
      - common

  backup:
    container_name: immich_db_dumper
    image: prodrigestivill/postgres-backup-local:14
    env_file:
      - .env
    environment:
      POSTGRES_HOST: database
      POSTGRES_CLUSTER: 'TRUE'
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      SCHEDULE: "@daily"
      POSTGRES_EXTRA_OPTS: '--clean --if-exists'
      BACKUP_DIR: /db_dumps
    volumes:
      - ./db_dumps:/db_dumps
    depends_on:
      - database
    networks:
      - common

volumes:
  model-cache: null
networks:
  common:
    external: true

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=main

# Connection secrets for postgres and typesense. You should change these to random passwords
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
DB_DATA_LOCATION=./postgres

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Select an album in iOS photos
2. The remainder shown in wrong
...

Relevant log output

No response

Additional information

No response

alextran1502 commented 2 months ago

There is a bug which we haven't tracked down on the cause of this, but all the valid files on your phone should be all uploaded

alternativesurfer commented 2 months ago

What logs can I add to help? Same is occurring for me on one of my Android phones, not the other.

Martin-Jia commented 2 months ago

For me, the remainder stops at a number (not zero). According to the uploading file info, the app seems keep uploading photos. However, the number does not change. And I checked from the web page, the seem uploaded photos do not appear.

cruizno commented 1 month ago

@Martin-Jia I am having the exact same issue.

xpzhang commented 4 weeks ago

@Martin-Jia @cruizno me too. After a clean reinstall on both server and client sides the problem came up again, with the same number of remainder

alextran1502 commented 3 weeks ago

@AlliotTech reuploading is the symptoms of CloudFlare tunnel limitation or reverse proxy configuration is incorrect. You may try connect through local IP and it should upload all

alextran1502 commented 3 weeks ago

@AlliotTech You are missing client_max_body_size 50000M; in your settings.

You can read more here https://immich.app/docs/administration/reverse-proxy

AlliotTech commented 3 weeks ago

@AlliotTech You are missing client_max_body_size 50000M; in your settings.

You can read more here https://immich.app/docs/administration/reverse-proxy

Thank you, i found the waf limited the body size.