api_version: iobackup.io/v1
kind: BackupJob
metadata:
  job_id: postgres-s3-streaming
  name: Postgres to S3 streaming backup
spec:
  enabled: true
  operation:
    type: backup
  artifact:
    mode: stream
    staging:
      enabled: false
  tasks:
    - task_id: postgres-main
      source:
        type: postgres
        config:
          host: 127.0.0.1
          port: 5433
          username: iobackup
          password_env: POSTGRES_BACKUP_PASSWORD
          databases:
            - iobackup_test
          dump:
            tool: pg_dump
            format: custom
            jobs: 1
            clean: false
            if_exists: false
      destination:
        type: s3
        config:
          endpoint: https://s3.twcstorage.ru
          region: ru-1
          bucket: iobackup
          prefix: iobackup-tests/postgres
          access_key_env: S3_ACCESS_KEY
          secret_key_env: S3_SECRET_KEY
          force_path_style: true
          storage_class: STANDARD
          multipart:
            enabled: true
            part_size: 67108864
            concurrency: 4
