{
  "name": "pg-dump-to-s3",
  "title": "Back up PostgreSQL to S3",
  "description": "Dump a PostgreSQL database with pg_dump and upload the dump file to an S3 bucket. Restore it with pg_restore.",
  "category": "Databases",
  "tags": [
    "aws-cli",
    "databases",
    "postgres"
  ],
  "latestVersion": "1.0.0",
  "versions": [
    "1.0.0"
  ],
  "parameters": [
    "bucket",
    "database",
    "host",
    "key",
    "user",
    "aws-access-key-id-key",
    "aws-secret-access-key-key",
    "aws-secret-name",
    "password-secret-key",
    "password-secret-name",
    "port",
    "region"
  ],
  "images": [
    "cgr.dev/chainguard/postgres@sha256:dfc3fba4527ef4bf91eaf9ee518589447f4f2ca3bea47c914bc50e959b3721cb",
    "amazon/aws-cli@sha256:d557b3524475d70dd3104cf44d96568ee3188897b73a6ece2b37aa50e1af362f"
  ],
  "url": "https://catalog.dagweave.com/api/v1/items/pg-dump-to-s3.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/pg-dump-to-s3/latest/template.yaml",
  "page": "https://catalog.dagweave.com/items/pg-dump-to-s3/",
  "entrypoint": "backup",
  "parameterDetails": [
    {
      "name": "bucket",
      "title": "Bucket",
      "description": "S3 bucket to put the dump in, without the s3:// prefix.",
      "type": "string",
      "required": true,
      "example": "acme-db-backups"
    },
    {
      "name": "database",
      "title": "Database",
      "description": "Database to connect to.",
      "type": "string",
      "required": true
    },
    {
      "name": "host",
      "title": "Host",
      "description": "PostgreSQL server host.",
      "type": "string",
      "required": true,
      "example": "db.internal"
    },
    {
      "name": "key",
      "title": "Key",
      "description": "Object key for the dump file.",
      "type": "string",
      "required": true,
      "example": "checkout/2026-10-18.dump"
    },
    {
      "name": "user",
      "title": "User",
      "description": "User to connect as.",
      "type": "string",
      "required": true
    },
    {
      "name": "aws-access-key-id-key",
      "title": "Aws access key id key",
      "description": "Key in that Secret that holds the access key id.",
      "type": "string",
      "required": false,
      "default": "access-key-id"
    },
    {
      "name": "aws-secret-access-key-key",
      "title": "Aws secret access key key",
      "description": "Key in that Secret that holds the secret access key.",
      "type": "string",
      "required": false,
      "default": "secret-access-key"
    },
    {
      "name": "aws-secret-name",
      "title": "Aws secret name",
      "description": "Name of the Kubernetes Secret that holds the AWS credentials.",
      "type": "string",
      "required": false,
      "default": "aws-credentials"
    },
    {
      "name": "password-secret-key",
      "title": "Password secret key",
      "description": "Key in that Secret that holds the password.",
      "type": "string",
      "required": false,
      "default": "password"
    },
    {
      "name": "password-secret-name",
      "title": "Password secret name",
      "description": "Name of the Kubernetes Secret that holds the user's password.",
      "type": "string",
      "required": false,
      "default": "postgres-password"
    },
    {
      "name": "port",
      "title": "Port",
      "description": "PostgreSQL server port.",
      "type": "string",
      "required": false,
      "default": "5432"
    },
    {
      "name": "region",
      "title": "Region",
      "description": "AWS region of the resource.",
      "type": "string",
      "required": false,
      "default": "us-east-1"
    }
  ],
  "imageDetails": [
    {
      "ref": "cgr.dev/chainguard/postgres@sha256:dfc3fba4527ef4bf91eaf9ee518589447f4f2ca3bea47c914bc50e959b3721cb",
      "repository": "cgr.dev/chainguard/postgres",
      "tag": "latest-dev",
      "digest": "sha256:dfc3fba4527ef4bf91eaf9ee518589447f4f2ca3bea47c914bc50e959b3721cb"
    },
    {
      "ref": "amazon/aws-cli@sha256:d557b3524475d70dd3104cf44d96568ee3188897b73a6ece2b37aa50e1af362f",
      "repository": "amazon/aws-cli",
      "tag": "2.39.3",
      "digest": "sha256:d557b3524475d70dd3104cf44d96568ee3188897b73a6ece2b37aa50e1af362f"
    }
  ],
  "versionDetails": [
    {
      "version": "1.0.0",
      "date": "2026-10-18",
      "notes": "Initial release.",
      "latest": true,
      "installable": true,
      "url": "https://catalog.dagweave.com/api/v1/items/pg-dump-to-s3/1.0.0.json",
      "templateUrl": "https://catalog.dagweave.com/api/v1/items/pg-dump-to-s3/1.0.0/template.yaml"
    }
  ],
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/pg-dump-to-s3",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
