api_version: iobackup.io/v1
kind: BackupJob
metadata:
  job_id: vault-local
  name: Vault KV backup to local destination
spec:
  enabled: true
  operation:
    type: backup
  artifact:
    mode: stream
    staging:
      enabled: false
  policies:
    verify:
      after_run: true
      limit_per_task: 1
  tasks:
    - task_id: vault-kv
      source:
        type: vault
        config:
          address: http://127.0.0.1:18200
          token_env: VAULT_TOKEN
          mount: iobackup
          kv_version: 2
          include_paths:
            - ""
          timeout: 30s
      backup:
        format: json
        checksum: sha256
      destination:
        type: local
        config:
          path: /add/tmp/backups-vault
      policies:
        retention:
          keep_last_successful: 3
