api_version: iobackup.io/v1
kind: BackupJob

metadata:
  job_id: filesystem-local-encrypted-example
  name: Filesystem → local with streaming encryption (key via env ref)

spec:
  enabled: true
  operation:
    type: backup
    strategy: full
  repository:
    type: single_artifact
    engine: iobackup
  tasks:
    - task_id: t1
      source:
        type: filesystem
        config:
          paths:
            - /etc/hosts
      destination:
        type: local
        config:
          path: /tmp/backups
      backup:
        format: tar.gz
        compression: gzip
        checksum: sha256
        encryption:
          enabled: true
          key_ref: "env:IOB_SMOKE_BK_KEY"
