exclude pattern doesn't remove old files matching the rule automatically #5702

Closed
opened 2026-02-05 11:40:22 +03:00 by OVERLORD · 14 comments
Owner

Originally created by @MarpleA on GitHub (Mar 28, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

I created two exlude pattern rules:
/media/Syncthing/Pictures/Fun/**
/media/Syncthing/Pictures/Documents/**

After performing a rescan of the library the files in these folder are not removed from the Immich timeline. If I delete these files afterwards in the UI and then do another scan of the library they also don't reappear. That's the assumed behavior.
However, I since there are a lot of pictures in these folders, I can't manually remove all of them from the timeline.

Furthermore, moving file to one of these folders after they have been created and do the rescan, works as it should.

The OS that Immich Server is running on

Ubuntu 24.04.02

Version of Immich Server

v1.130.3

Version of Immich Mobile App

v1.130.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

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}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /media/Photos:/media/Photos:ro
      - /media/Syncthing:/media/Syncthing:ro
      - /media/MyVideos:/media/MyVideos:ro
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  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
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
    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

volumes:
  model-cache:

Your .env content

*

Reproduction steps

  1. create an exclusion rule for folders
  2. do a library scan
  3. search for file from these folders in the webui
    ...

Relevant log output


Additional information

No response

Originally created by @MarpleA on GitHub (Mar 28, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug I created two exlude pattern rules: /media/Syncthing/Pictures/Fun/** /media/Syncthing/Pictures/Documents/** After performing a rescan of the library the files in these folder are not removed from the Immich timeline. If I delete these files afterwards in the UI and then do another scan of the library they also don't reappear. That's the assumed behavior. However, I since there are a lot of pictures in these folders, I can't manually remove all of them from the timeline. Furthermore, moving file to one of these folders after they have been created and do the rescan, works as it should. ### The OS that Immich Server is running on Ubuntu 24.04.02 ### Version of Immich Server v1.130.3 ### Version of Immich Mobile App v1.130.0 ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML 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}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /media/Photos:/media/Photos:ro - /media/Syncthing:/media/Syncthing:ro - /media/MyVideos:/media/MyVideos:ro env_file: - .env ports: - '2283:2283' depends_on: - redis - database restart: always healthcheck: disable: false 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 healthcheck: disable: false redis: container_name: immich_redis image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8 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 volumes: model-cache: ``` ### Your .env content ```Shell * ``` ### Reproduction steps 1. create an exclusion rule for folders 2. do a library scan 3. search for file from these folders in the webui ... ### Relevant log output ```shell ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Mar 28, 2025):

@etnoy Do you have any thought on this?

@alextran1502 commented on GitHub (Mar 28, 2025): @etnoy Do you have any thought on this?
Author
Owner

@etnoy commented on GitHub (Mar 28, 2025):

Please post logs for the library scan with log level debug

@etnoy commented on GitHub (Mar 28, 2025): Please post logs for the library scan with log level debug
Author
Owner

@MarpleA commented on GitHub (Mar 28, 2025):

my code is:

[Nest] 17  - 03/28/2025, 8:13:19 AM     LOG [Api:SystemConfigService~n5phd6ev] LogLevel=debug (set via system config)
[Nest] 17  - 03/28/2025, 8:13:19 AM   DEBUG [Api:LoggingInterceptor~n5phd6ev] PUT /api/system-config 200 117.13ms ::ffff:192.168.100.111
[Nest] 7  - 03/28/2025, 8:13:19 AM     LOG [Microservices:SystemConfigService] LogLevel=debug (set via system config)
[Nest] 17  - 03/28/2025, 8:13:19 AM   DEBUG [Api:LoggingInterceptor~z64jd7iq] GET /api/server/features 200 13.93ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:19 AM   DEBUG [Api:LoggingInterceptor~k7gaykl4] GET /api/server/config 200 17.73ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:27 AM   DEBUG [Api:LoggingInterceptor~nyccb882] GET /api/server/storage 200 1.61ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:27 AM   DEBUG [Api:LoggingInterceptor~ndal3p4j] GET /api/admin/users?withDeleted=false 200 6.16ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:27 AM   DEBUG [Api:LoggingInterceptor~g8rs0y1h] GET /api/libraries 200 3.69ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:27 AM   DEBUG [Api:LoggingInterceptor~x0h2mejl] GET /api/libraries/2b90ee0c-216d-4f33-9500-aae27cfc0d3f/statistics 200 130.68ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:27 AM   DEBUG [Api:LoggingInterceptor~39e9mk6h] GET /api/admin/users/4c8ab099-422d-4ac5-b5ff-56ca46b691d2 200 6.91ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:27 AM   DEBUG [Api:LoggingInterceptor~7ycko6uf] GET /api/libraries/a37fc860-86e5-4451-b479-383b44c4942d/statistics 200 90.92ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:27 AM   DEBUG [Api:LoggingInterceptor~in8evm38] GET /api/admin/users/4c8ab099-422d-4ac5-b5ff-56ca46b691d2 200 5.41ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:28 AM   DEBUG [Api:LoggingInterceptor~l74a79t4] GET /api/libraries/10efd7fd-1054-4af3-ab80-9e6b9ab51fd9/statistics 200 65.41ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:28 AM   DEBUG [Api:LoggingInterceptor~4b5yfz02] GET /api/admin/users/4c8ab099-422d-4ac5-b5ff-56ca46b691d2 200 5.95ms ::ffff:192.168.100.111
[Nest] 17  - 03/28/2025, 8:13:30 AM     LOG [Api:LibraryService~yjbal7jl] Starting to scan library a37fc860-86e5-4451-b479-383b44c4942d
[Nest] 17  - 03/28/2025, 8:13:30 AM   DEBUG [Api:LoggingInterceptor~yjbal7jl] POST /api/libraries/a37fc860-86e5-4451-b479-383b44c4942d/scan 204 4.83ms ::ffff:192.168.100.111
[Nest] 7  - 03/28/2025, 8:13:30 AM   DEBUG [Microservices:LibraryService] Validating import paths for library a37fc860-86e5-4451-b479-383b44c4942d...
[Nest] 7  - 03/28/2025, 8:13:30 AM     LOG [Microservices:LibraryService] Starting disk crawl of 1 import path(s) for library a37fc860-86e5-4451-b479-383b44c4942d...
[Nest] 7  - 03/28/2025, 8:13:30 AM     LOG [Microservices:LibraryService] Checking 8718 asset(s) against import paths and exclusion patterns in library a37fc860-86e5-4451-b479-383b44c4942d...
[Nest] 7  - 03/28/2025, 8:13:30 AM     LOG [Microservices:LibraryService] 0 asset(s) out of 8718 were offlined due to import paths and/or exclusion pattern(s) in library a37fc860-86e5-4451-b479-383b44c4942d
[Nest] 7  - 03/28/2025, 8:13:30 AM     LOG [Microservices:LibraryService] Scanning library a37fc860-86e5-4451-b479-383b44c4942d for assets missing from disk...
[Nest] 7  - 03/28/2025, 8:13:30 AM     LOG [Microservices:LibraryService] Queued check of 8718 of 8718 (100.0 %) existing asset(s) so far in library a37fc860-86e5-4451-b479-383b44c4942d
[Nest] 7  - 03/28/2025, 8:13:30 AM     LOG [Microservices:LibraryService] Finished queuing 8718 asset check(s) for library a37fc860-86e5-4451-b479-383b44c4942d
[Nest] 7  - 03/28/2025, 8:13:31 AM   DEBUG [Microservices:LibraryService] Checking batch of 8718 existing asset(s) in library a37fc860-86e5-4451-b479-383b44c4942d
[Nest] 7  - 03/28/2025, 8:13:33 AM     LOG [Microservices:LibraryService] Checked existing asset(s): 0 offlined, 0 onlined, 0 updated, 8718 unchanged of current batch of 8718 (Total progress: 8718 of 8718, 100.0 %) in library a37fc860-86e5-4451-b479-383b44c4942d.
[Nest] 7  - 03/28/2025, 8:13:33 AM     LOG [Microservices:LibraryService] Crawled 7544 file(s) so far: 0 of current batch of 7544 will be imported to library a37fc860-86e5-4451-b479-383b44c4942d...
[Nest] 7  - 03/28/2025, 8:13:33 AM     LOG [Microservices:LibraryService] Finished disk crawl, 7544 file(s) found on disk and queued 0 file(s) for import into a37fc860-86e5-4451-b479-383b44c4942d
[Nest] 17  - 03/28/2025, 8:13:46 AM   DEBUG [Api:LoggingInterceptor~6um9noqw] GET /api/server/ping 200 0.28ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:14:16 AM   DEBUG [Api:LoggingInterceptor~e8w1zaeh] GET /api/server/ping 200 0.32ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:14:46 AM   DEBUG [Api:LoggingInterceptor~j43ibv2i] GET /api/server/ping 200 0.27ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:15:16 AM   DEBUG [Api:LoggingInterceptor~veczqyuh] GET /api/server/ping 200 0.47ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:15:47 AM   DEBUG [Api:LoggingInterceptor~44x5pal7] GET /api/server/ping 200 0.47ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:16:17 AM   DEBUG [Api:LoggingInterceptor~n2gcrage] GET /api/server/ping 200 0.35ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:16:47 AM   DEBUG [Api:LoggingInterceptor~di393yx1] GET /api/server/ping 200 0.28ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:17:17 AM   DEBUG [Api:LoggingInterceptor~5p8c701t] GET /api/server/ping 200 0.38ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:17:47 AM   DEBUG [Api:LoggingInterceptor~1n2elgxa] GET /api/server/ping 200 0.34ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:18:17 AM   DEBUG [Api:LoggingInterceptor~tsgzyerb] GET /api/server/ping 200 0.25ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:18:47 AM   DEBUG [Api:LoggingInterceptor~x5stwcfn] GET /api/server/ping 200 0.30ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:19:17 AM   DEBUG [Api:LoggingInterceptor~g13y4fqv] GET /api/server/ping 200 0.28ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:19:47 AM   DEBUG [Api:LoggingInterceptor~ntej71dp] GET /api/server/ping 200 0.43ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:20:18 AM   DEBUG [Api:LoggingInterceptor~xyfp43ug] GET /api/server/ping 200 0.58ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:20:48 AM   DEBUG [Api:LoggingInterceptor~n6ib2lvv] GET /api/server/ping 200 0.33ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:21:18 AM   DEBUG [Api:LoggingInterceptor~xf5ffdbw] GET /api/server/ping 200 0.35ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:21:48 AM   DEBUG [Api:LoggingInterceptor~pga6396d] GET /api/server/ping 200 0.48ms ::ffff:127.0.0.1
[Nest] 17  - 03/28/2025, 8:22:18 AM   DEBUG [Api:LoggingInterceptor~837y78c9] GET /api/server/ping 200 0.35ms ::ffff:127.0.0.1
@MarpleA commented on GitHub (Mar 28, 2025): my code is: ``` [Nest] 17 - 03/28/2025, 8:13:19 AM LOG [Api:SystemConfigService~n5phd6ev] LogLevel=debug (set via system config) [Nest] 17 - 03/28/2025, 8:13:19 AM DEBUG [Api:LoggingInterceptor~n5phd6ev] PUT /api/system-config 200 117.13ms ::ffff:192.168.100.111 [Nest] 7 - 03/28/2025, 8:13:19 AM LOG [Microservices:SystemConfigService] LogLevel=debug (set via system config) [Nest] 17 - 03/28/2025, 8:13:19 AM DEBUG [Api:LoggingInterceptor~z64jd7iq] GET /api/server/features 200 13.93ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:19 AM DEBUG [Api:LoggingInterceptor~k7gaykl4] GET /api/server/config 200 17.73ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:27 AM DEBUG [Api:LoggingInterceptor~nyccb882] GET /api/server/storage 200 1.61ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:27 AM DEBUG [Api:LoggingInterceptor~ndal3p4j] GET /api/admin/users?withDeleted=false 200 6.16ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:27 AM DEBUG [Api:LoggingInterceptor~g8rs0y1h] GET /api/libraries 200 3.69ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:27 AM DEBUG [Api:LoggingInterceptor~x0h2mejl] GET /api/libraries/2b90ee0c-216d-4f33-9500-aae27cfc0d3f/statistics 200 130.68ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:27 AM DEBUG [Api:LoggingInterceptor~39e9mk6h] GET /api/admin/users/4c8ab099-422d-4ac5-b5ff-56ca46b691d2 200 6.91ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:27 AM DEBUG [Api:LoggingInterceptor~7ycko6uf] GET /api/libraries/a37fc860-86e5-4451-b479-383b44c4942d/statistics 200 90.92ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:27 AM DEBUG [Api:LoggingInterceptor~in8evm38] GET /api/admin/users/4c8ab099-422d-4ac5-b5ff-56ca46b691d2 200 5.41ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:28 AM DEBUG [Api:LoggingInterceptor~l74a79t4] GET /api/libraries/10efd7fd-1054-4af3-ab80-9e6b9ab51fd9/statistics 200 65.41ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:28 AM DEBUG [Api:LoggingInterceptor~4b5yfz02] GET /api/admin/users/4c8ab099-422d-4ac5-b5ff-56ca46b691d2 200 5.95ms ::ffff:192.168.100.111 [Nest] 17 - 03/28/2025, 8:13:30 AM LOG [Api:LibraryService~yjbal7jl] Starting to scan library a37fc860-86e5-4451-b479-383b44c4942d [Nest] 17 - 03/28/2025, 8:13:30 AM DEBUG [Api:LoggingInterceptor~yjbal7jl] POST /api/libraries/a37fc860-86e5-4451-b479-383b44c4942d/scan 204 4.83ms ::ffff:192.168.100.111 [Nest] 7 - 03/28/2025, 8:13:30 AM DEBUG [Microservices:LibraryService] Validating import paths for library a37fc860-86e5-4451-b479-383b44c4942d... [Nest] 7 - 03/28/2025, 8:13:30 AM LOG [Microservices:LibraryService] Starting disk crawl of 1 import path(s) for library a37fc860-86e5-4451-b479-383b44c4942d... [Nest] 7 - 03/28/2025, 8:13:30 AM LOG [Microservices:LibraryService] Checking 8718 asset(s) against import paths and exclusion patterns in library a37fc860-86e5-4451-b479-383b44c4942d... [Nest] 7 - 03/28/2025, 8:13:30 AM LOG [Microservices:LibraryService] 0 asset(s) out of 8718 were offlined due to import paths and/or exclusion pattern(s) in library a37fc860-86e5-4451-b479-383b44c4942d [Nest] 7 - 03/28/2025, 8:13:30 AM LOG [Microservices:LibraryService] Scanning library a37fc860-86e5-4451-b479-383b44c4942d for assets missing from disk... [Nest] 7 - 03/28/2025, 8:13:30 AM LOG [Microservices:LibraryService] Queued check of 8718 of 8718 (100.0 %) existing asset(s) so far in library a37fc860-86e5-4451-b479-383b44c4942d [Nest] 7 - 03/28/2025, 8:13:30 AM LOG [Microservices:LibraryService] Finished queuing 8718 asset check(s) for library a37fc860-86e5-4451-b479-383b44c4942d [Nest] 7 - 03/28/2025, 8:13:31 AM DEBUG [Microservices:LibraryService] Checking batch of 8718 existing asset(s) in library a37fc860-86e5-4451-b479-383b44c4942d [Nest] 7 - 03/28/2025, 8:13:33 AM LOG [Microservices:LibraryService] Checked existing asset(s): 0 offlined, 0 onlined, 0 updated, 8718 unchanged of current batch of 8718 (Total progress: 8718 of 8718, 100.0 %) in library a37fc860-86e5-4451-b479-383b44c4942d. [Nest] 7 - 03/28/2025, 8:13:33 AM LOG [Microservices:LibraryService] Crawled 7544 file(s) so far: 0 of current batch of 7544 will be imported to library a37fc860-86e5-4451-b479-383b44c4942d... [Nest] 7 - 03/28/2025, 8:13:33 AM LOG [Microservices:LibraryService] Finished disk crawl, 7544 file(s) found on disk and queued 0 file(s) for import into a37fc860-86e5-4451-b479-383b44c4942d [Nest] 17 - 03/28/2025, 8:13:46 AM DEBUG [Api:LoggingInterceptor~6um9noqw] GET /api/server/ping 200 0.28ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:14:16 AM DEBUG [Api:LoggingInterceptor~e8w1zaeh] GET /api/server/ping 200 0.32ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:14:46 AM DEBUG [Api:LoggingInterceptor~j43ibv2i] GET /api/server/ping 200 0.27ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:15:16 AM DEBUG [Api:LoggingInterceptor~veczqyuh] GET /api/server/ping 200 0.47ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:15:47 AM DEBUG [Api:LoggingInterceptor~44x5pal7] GET /api/server/ping 200 0.47ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:16:17 AM DEBUG [Api:LoggingInterceptor~n2gcrage] GET /api/server/ping 200 0.35ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:16:47 AM DEBUG [Api:LoggingInterceptor~di393yx1] GET /api/server/ping 200 0.28ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:17:17 AM DEBUG [Api:LoggingInterceptor~5p8c701t] GET /api/server/ping 200 0.38ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:17:47 AM DEBUG [Api:LoggingInterceptor~1n2elgxa] GET /api/server/ping 200 0.34ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:18:17 AM DEBUG [Api:LoggingInterceptor~tsgzyerb] GET /api/server/ping 200 0.25ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:18:47 AM DEBUG [Api:LoggingInterceptor~x5stwcfn] GET /api/server/ping 200 0.30ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:19:17 AM DEBUG [Api:LoggingInterceptor~g13y4fqv] GET /api/server/ping 200 0.28ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:19:47 AM DEBUG [Api:LoggingInterceptor~ntej71dp] GET /api/server/ping 200 0.43ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:20:18 AM DEBUG [Api:LoggingInterceptor~xyfp43ug] GET /api/server/ping 200 0.58ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:20:48 AM DEBUG [Api:LoggingInterceptor~n6ib2lvv] GET /api/server/ping 200 0.33ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:21:18 AM DEBUG [Api:LoggingInterceptor~xf5ffdbw] GET /api/server/ping 200 0.35ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:21:48 AM DEBUG [Api:LoggingInterceptor~pga6396d] GET /api/server/ping 200 0.48ms ::ffff:127.0.0.1 [Nest] 17 - 03/28/2025, 8:22:18 AM DEBUG [Api:LoggingInterceptor~837y78c9] GET /api/server/ping 200 0.35ms ::ffff:127.0.0.1 ```
Author
Owner

@etnoy commented on GitHub (Mar 28, 2025):

OK, the line 0 asset(s) out of 8718 were offlined due to import paths and/or exclusion pattern(s) in library a37fc860-86e5-4451-b479-383b44c4942d shows that no assets match the exclusion patterns.

Are there any items in the trash? Offline external assets are moved there.

Can you give an example of an asset path that you want to be offline?

@etnoy commented on GitHub (Mar 28, 2025): OK, the line `0 asset(s) out of 8718 were offlined due to import paths and/or exclusion pattern(s) in library a37fc860-86e5-4451-b479-383b44c4942d` shows that no assets match the exclusion patterns. Are there any items in the trash? Offline external assets are moved there. Can you give an example of an asset path that you want to be offline?
Author
Owner

@MarpleA commented on GitHub (Mar 28, 2025):

sure.
there's nothing in the trash after excluding the folders.

Here the last exclusion I tried:
/media/Syncthing/Pictures_Mike/Auto/**

checked the log files again after scanning and it didn't find these files either
0 asset(s) out of 8120 were offlined due to import paths and/or exclusion pattern(s) in library a37fc860-86e5-4451-b479-383b44c4942d

I also deactivated the trash and did the same test - but same result.

However, If I remove the files of these excluded folders in the webui and also delete the trash, they don't reappear after the next scan. So this seems to me like an indication that the exclusion does work but not for files being existent before adding the exclusion.

@MarpleA commented on GitHub (Mar 28, 2025): sure. there's nothing in the trash after excluding the folders. Here the last exclusion I tried: `/media/Syncthing/Pictures_Mike/Auto/**` checked the log files again after scanning and it didn't find these files either `0 asset(s) out of 8120 were offlined due to import paths and/or exclusion pattern(s) in library a37fc860-86e5-4451-b479-383b44c4942d` I also deactivated the trash and did the same test - but same result. However, If I remove the files of these excluded folders in the webui and also delete the trash, they don't reappear after the next scan. So this seems to me like an indication that the exclusion does work but not for files being existent before adding the exclusion.
Author
Owner

@skylatian commented on GitHub (Mar 28, 2025):

Just wanted to bump this, as I have the same issue. Happy to provide config files or logs if it’d be helpful - I’m using an external library set to read-only.

@skylatian commented on GitHub (Mar 28, 2025): Just wanted to bump this, as I have the same issue. Happy to provide config files or logs if it’d be helpful - I’m using an external library set to read-only.
Author
Owner

@etnoy commented on GitHub (Mar 28, 2025):

OK, I'll have to investigate some more.

As a workaround, try setting the import path to an empty folder that does not contain the assets and rescan. All your assets will be marked offline. Then set the paths back and rescan. Only the non-excluded files should then be imported and the rest remain offline in trash. Does this help?

@etnoy commented on GitHub (Mar 28, 2025): OK, I'll have to investigate some more. As a workaround, try setting the import path to an empty folder that does not contain the assets and rescan. All your assets will be marked offline. Then set the paths back and rescan. Only the non-excluded files should then be imported and the rest remain offline in trash. Does this help?
Author
Owner

@petettx commented on GitHub (Mar 29, 2025):

I could try that.
The folders I try to exclude are subfolders of this Syncthing folder.
If setting the external library path to an empty folder, I am afraid I lose the metadata and face recognition information then. Or am I wrong?

@petettx commented on GitHub (Mar 29, 2025): I could try that. The folders I try to exclude are subfolders of this Syncthing folder. If setting the external library path to an empty folder, I am afraid I lose the metadata and face recognition information then. Or am I wrong?
Author
Owner

@etnoy commented on GitHub (Mar 30, 2025):

Don't worry, Immich is smart enough not to remove metadata information. Instead, files are marked as offline, and as long as they are found within 30 days they will not be removed.

Put an empty folder as import path, scan, put the import path back, scan again.

@etnoy commented on GitHub (Mar 30, 2025): Don't worry, Immich is smart enough not to remove metadata information. Instead, files are marked as offline, and as long as they are found within 30 days they will not be removed. Put an empty folder as import path, scan, put the import path back, scan again.
Author
Owner

@petettx commented on GitHub (Mar 30, 2025):

Alright, this workaround does work as you said.
For those using this workaround as well, I re-enabled the trash before even tough, I am not sure if that's needed.
If there's anything I can do to help fixing this bug, let me know. Things like testing or providing logs.

@petettx commented on GitHub (Mar 30, 2025): Alright, this workaround does work as you said. For those using this workaround as well, I re-enabled the trash before even tough, I am not sure if that's needed. If there's anything I can do to help fixing this bug, let me know. Things like testing or providing logs.
Author
Owner

@skylatian commented on GitHub (Mar 30, 2025):

I can also confirm that this fix worked. I didn't do anything with the trash, just pointed my external library at an empty folder, scanned, then pointed it back at the original directory. A wierd workaround but it's helpful for now!

@skylatian commented on GitHub (Mar 30, 2025): I can also confirm that this fix worked. I didn't do anything with the trash, just pointed my external library at an empty folder, scanned, then pointed it back at the original directory. A wierd workaround but it's helpful for now!
Author
Owner

@MarpleA commented on GitHub (Mar 31, 2025):

I just realized that the exclusion of folders not only removes these pictures from the timeline but also from the folder view.
I this a desired behavior?
From a user perspective, it would be great to exclude specific folders as already implemented but the same time have the ability to access these folders from the folder view.

@MarpleA commented on GitHub (Mar 31, 2025): I just realized that the exclusion of folders not only removes these pictures from the timeline but also from the folder view. I this a desired behavior? From a user perspective, it would be great to exclude specific folders as already implemented but the same time have the ability to access these folders from the folder view.
Author
Owner

@etnoy commented on GitHub (Mar 31, 2025):

I just realized that the exclusion of folders not only removes these pictures from the timeline but also from the folder view. I this a desired behavior? From a user perspective, it would be great to exclude specific folders as already implemented but the same time have the ability to access these folders from the folder view.

Yes, exclusion patterns are intended to completely remove them from Immich.

An improved folder view is on my todo list, for instance having scanned slides (where timestamps are unreliable) only shown in folder view and not timeline. No commitment though ;)

@etnoy commented on GitHub (Mar 31, 2025): > I just realized that the exclusion of folders not only removes these pictures from the timeline but also from the folder view. I this a desired behavior? From a user perspective, it would be great to exclude specific folders as already implemented but the same time have the ability to access these folders from the folder view. Yes, exclusion patterns are intended to completely remove them from Immich. An improved folder view is on my todo list, for instance having scanned slides (where timestamps are unreliable) only shown in folder view and not timeline. No commitment though ;)
Author
Owner

@MarpleA commented on GitHub (Mar 31, 2025):

I thought so, unfortunately :-)
However, thanks for the great work you do with immich. I begin to love it. :-)

Maybe doing it the other way round could also be an - maybe easier - option. Meaning, I could not exlude any folders at all, to keep them in the folder view. But having options in timeline view, explore, map and people to hide these folders.

May this be an option?

@MarpleA commented on GitHub (Mar 31, 2025): I thought so, unfortunately :-) However, thanks for the great work you do with immich. I begin to love it. :-) Maybe doing it the other way round could also be an - maybe easier - option. Meaning, I could not exlude any folders at all, to keep them in the folder view. But having options in timeline view, explore, map and people to hide these folders. May this be an option?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#5702