I can't seem to find my ignore rules

Hello, It’s a bit strange, In my snapshots of D:\, directories starting with repository_ in KopiaUI_Portable\repositories\cache\ are empty.
So most of the Kopia Cache files are excluded, but I can’t figure out where I set those exclusion rules. Is this a built-in exclusion rule?

I searched the entire hard drive and there is no file named .kopiaignore

❯  kopia.exe policy show D:\
Policy for xx@xxxx:D:\:

Retention:
  Annual snapshots:                     0   inherited from (global)
  Monthly snapshots:                    0   inherited from (global)
  Weekly snapshots:                     4   inherited from (global)
  Daily snapshots:                      7   inherited from (global)
  Hourly snapshots:                     0   inherited from (global)
  Latest snapshots:                     7   inherited from (global)
  Ignore identical snapshots:        true   inherited from (global)

Files policy:
  Ignore cache directories:          true   inherited from (global)
  No ignore rules:
  Read ignore rules from files:             inherited from (global)
    .kopiaignore
  Scan one filesystem only:         false   inherited from (global)

Error handling policy:
  Ignore file read errors:           true   inherited from (global)
  Ignore directory read errors:      true   inherited from (global)
  Ignore unknown types:              true   inherited from (global)

Scheduling policy:
  Scheduled snapshots:
    None.
  Manual snapshot:                  false   inherited from (global)

Uploads:
  Max parallel snapshots (server/UI):   1   inherited from (global)
  Max parallel file reads:              -   inherited from (global)
  Parallel upload above size:      2.1 GB   inherited from (global)

Compression:
  Compressor:                  s2-default   inherited from (global)
  Compress files regardless of extensions.
  Compress files of all sizes.

No actions defined.

OS-level snapshot support:
  Volume Shadow Copy:              always   inherited from (global)

Logging details (0-none, 10-maximum):
  Directory snapshotted:                5   inherited from (global)
  Directory ignored:                    5   inherited from (global)
  Entry snapshotted:                    0   inherited from (global)
  Entry ignored:                        5   inherited from (global)
  Entry cache hit:                      0   inherited from (global)
  Entry cache miss:                     0   inherited from (global)
❯  kopia.exe  policy show --global
Policy for (global):

Retention:
  Annual snapshots:                     0   (defined for this target)
  Monthly snapshots:                    0   (defined for this target)
  Weekly snapshots:                     4   (defined for this target)
  Daily snapshots:                      7   (defined for this target)
  Hourly snapshots:                     0   (defined for this target)
  Latest snapshots:                     7   (defined for this target)
  Ignore identical snapshots:        true   (defined for this target)

Files policy:
  Ignore cache directories:          true   (defined for this target)
  No ignore rules:
  Read ignore rules from files:             (defined for this target)
    .kopiaignore
  Scan one filesystem only:         false   (defined for this target)

Error handling policy:
  Ignore file read errors:           true   (defined for this target)
  Ignore directory read errors:      true   (defined for this target)
  Ignore unknown types:              true   (defined for this target)

Scheduling policy:
  Scheduled snapshots:
    None.
  Manual snapshot:                  false   (defined for this target)

Uploads:
  Max parallel snapshots (server/UI):   1   (defined for this target)
  Max parallel file reads:              -   (defined for this target)
  Parallel upload above size:      2.1 GB   (defined for this target)

Compression:
  Compressor:                  s2-default   (defined for this target)
  Compress files regardless of extensions.
  Compress files of all sizes.

No actions defined.

OS-level snapshot support:
  Volume Shadow Copy:              always   (defined for this target)

Logging details (0-none, 10-maximum):
  Directory snapshotted:                5   (defined for this target)
  Directory ignored:                    5   (defined for this target)
  Entry snapshotted:                    0   (defined for this target)
  Entry ignored:                        5   (defined for this target)
  Entry cache hit:                      0   (defined for this target)
  Entry cache miss:                     0   (defined for this target)

Can you explain it? It is not really clear what you are doing here.

You are backing up drive D: using kopia to some repository. And what is the problem? Some data is not included in snapshots? Or you are talking about some kopia cache being empty?

I’m backing up drive D: using kopia to a repository. And some data is not included in the snapshots. These data are Kopia cache files located in directories that start with repository_ within the KopiaUI_Portable\repositories\cache\ folder.

These directories are the cache files directies specified by the --cache-directory parameter of the repository create command.

I originally prepared a few screenshots, but I couldn’t post them due to forum permission restrictions.

The backslash needs to be escaped.

kopia.exe policy show D:\\
1 Like

I tried it out, kopia.exe policy show D:\ is the same as kopia.exe policy show D:\\ when using Windows Terminal

Regarding the main post, my guess is that Kopia’s built-in rules exclude its own cache files

I think kopia (and many other programs - backup, tar etc.) respects CACHEDIR.TAG which is always added to kopia cache. It is configurable and you have it set to true:

1 Like

You are right, I am blind.