api_version: iobackup.io/v1
kind: BackupJob
metadata:
  job_id: docker-compose-local
  name: Docker Compose project 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: compose-project
      source:
        type: docker_compose
        config:
          project_dir: /add/global/projects/iobackup/examples/dev/compose-app
          compose_files:
            - docker-compose.yml
          include_paths:
            - .env
          snapshot_volumes: true
          timeout: 30m
      backup:
        format: tar.gz
        checksum: sha256
      destination:
        type: local
        config:
          path: /add/tmp/backups-docker-compose
      policies:
        retention:
          keep_last_successful: 3
