How to Customize Snapshot Directory Structure in Kopia to Mirror Source Folders?

I am currently using KopiaUI (via docker-compose) to back up my files, and I would like to customize the snapshot directory structure in the repository to mirror the source folder hierarchy. Below are the details of my setup and requirements:

My source files are organized as follows:

.
├── Blog
├── DockerAppData
├── Flash
├── Mobile
├── Music
├── PVE
├── Photos
├── Pictures
├── Projects

I want the snapshots in the repository (/repo) to preserve the same directory structure as the source. For example:

source/Blog --> /repo/Blog
source/DockerAppData --> /repo/DockerAppData

Here is my docker-compose.yml configuration for Kopia:

  kopia:
    image: kopia/kopia:latest
    container_name: kopia
    hostname: kopia
    restart: unless-stopped
    ports:
      - "51515:51515"
    command: [
      "server", "start",
      "--disable-csrf-token-checks",
      "--insecure",
      "--address=0.0.0.0:51515",
      "--server-username=Jason",
      "--server-password=xxx"
    ]
    volumes:
      - "/mnt/user/appdata/kopia/config:/app/config"
      - "/mnt/user/appdata/kopia/cache:/app/cache"
      - "/mnt/user/appdata/kopia/logs:/app/logs"
      - "/mnt/user/TempBackup:/data/TempBackup:ro"
      - "/mnt/user/Sync/:/data/Sync:ro"
      - "/mnt/user/Music:/data/Music:ro"
      - "/mnt/user/Backup:/repo"
      - "/mnt/user/TempBackup/kopiaMount:/tmp"
    environment:
      - UID=99
      - GID=100
      - UMASK=000
      - TZ=Asia/Shanghai
      - USER=root
      - KOPIA_PASSWORD=xxx
    networks:
      - backup
    logging:
      driver: json-file
      options:
        max-size: 100

How can I configure Kopia to save snapshots in a way that mirrors the source directory structure? Specifically:

  1. What settings or commands should I use to ensure that the snapshot directories in /repo match the source folder hierarchy?
  2. Are there any additional configurations required in the docker-compose.yml file or within KopiaUI to achieve this?

Any guidance or examples would be greatly appreciated!

Kopia repo does not have any directories corresponding to snapshots’ sources directories structure. It is set of encrypted files which can be distributed between different sharding folders. You will not see anything resembling data you are backing up. And it is good as you do not want to leak any secrets.

So your request does not make any sense and is simply impossible.

I suggest you create some test kopia backup locally and examine yourself how things look like.