S3 (source)

type: s3 — pulls files from an S3-compatible bucket so they can be re-archived to another destination.

Prerequisites

  • No external binaries required — snapr uses the AWS SDK directly.
  • The configured credentials need s3:ListBucket on the bucket and s3:GetObject on the keys (or the prefix selected by path).

Fields

FieldTypeRequiredNotes
types3yes
bucketstringyes
regionstringyes
accessKeyIdstringyesuse env:
secretAccessKeystringyesuse env:
endpointstringnocustom endpoint for non-AWS S3 (MinIO, Wasabi, etc.). Implies path-style.
usePathStyleboolnoforce path-style addressing when endpoint is empty (rare)
pathstringnoobject key prefix to download (default: whole bucket)
excludesstring[]noglob patterns matched against bucket-relative paths (skipped)
syncPathstringnolocal directory used as a persistent cache. When set, snapr keeps already-downloaded objects between runs and only fetches new/changed ones.

How it works

snapr lists the bucket (under path if set) and downloads matching objects. Without syncPath it uses a temporary directory cleaned up after the run. With syncPath it reuses the directory across runs and skips objects whose size + modification time already match locally.

The downloaded tree is then compressed, encrypted, and uploaded to the configured storages. There is no direct bucket-to-bucket transfer. See Sources → How remote sources are fetched.

Example — AWS

sources:
  - type: s3
    bucket: my-app-uploads
    region: us-east-1
    accessKeyId: env:S3_KEY
    secretAccessKey: env:S3_SECRET
    path: production/

Example — MinIO with persistent cache

sources:
  - type: s3
    bucket: my-bucket
    region: us-east-1
    endpoint: https://minio.internal:9000
    accessKeyId: env:MINIO_KEY
    secretAccessKey: env:MINIO_SECRET
    syncPath: /var/cache/snapr/minio