Log icon
Commands icon
Script icon
Docker icon
If icon
Fail icon
Upload icon
Set icon
SlackIncomingWebhook icon

ChromaDB Vector Collection Snapshot and AWS S3 Disaster Recovery Pipeline

Extract and archive ChromaDB vector collections to compressed Parquet in AWS S3 with preflight validation, KV tracking, and Slack alerts.

Categories
AICloudData

How it works

  1. Preflight Health & Count Probe: Verifies ChromaDB REST API v2 heartbeat and queries total vector count for the target collection.
  2. Collection Validation: Docker Python container verifies collection integrity and enforces a non-empty threshold to prevent backing up corrupted or empty databases.
  3. Paginated Vector & Metadata Extraction: Iteratively streams vector embeddings, document contents, and metadata payloads in bounded batches, serialization into an optimized Snappy-compressed Apache Parquet table.
  4. Encrypted S3 Upload: Archives the timestamped Parquet snapshot directly into an AWS S3 disaster recovery bucket using io.kestra.plugin.aws.s3.Upload.
  5. State Tracking: Stores the latest backup location, vector count, and timestamp in Kestra KV Store for fast recovery lookup.
  6. Multi-Channel Notification: Emits formatted Slack notifications upon successful completion, and triggers instant alerts on task failure.

What you get

  • Resilient disaster recovery backups for ChromaDB vector collections.
  • Zero data corruption guarantee via preflight vector count guardrails.
  • Compact, standard Apache Parquet storage format compatible with DuckDB, Spark, and Athena.
  • Persistent backup audit catalog inside Kestra KV store.

Who it's for

  • MLOps and AI Engineers running persistent ChromaDB instances.
  • Platform and SRE teams requiring automated RPO/RTO compliance for Generative AI applications.

Why orchestrate this with Kestra

  • Combines containerized batch data extraction (io.kestra.plugin.scripts.runner.docker.Docker) with cloud object storage (io.kestra.plugin.aws.s3.Upload).
  • Eliminates custom cron jobs and unmonitored bash scripts with native retry logic, dead-letter error handlers, and state management.

Prerequisites

  • Persistent ChromaDB instance accessible over HTTP/HTTPS.
  • AWS S3 bucket with write permissions.
  • Slack webhook URL for notifications.

Secrets

  • AWS_ACCESS_KEY_ID: AWS IAM access key with S3 PutObject permission.
  • AWS_SECRET_ACCESS_KEY: AWS IAM secret key.
  • SLACK_WEBHOOK_URL: Incoming webhook URL for operational alerts.

Quick start

  1. Import this blueprint into your Kestra instance.
  2. Configure the required secrets (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, SLACK_WEBHOOK_URL).
  3. Trigger the workflow manually or attach a daily io.kestra.plugin.core.trigger.Schedule to run nightly backups.

How to extend

  • Add an automated restore drill flow that reads the S3 Parquet file and repopulates a staging ChromaDB instance.
  • Connect to AWS KMS to apply client-side envelope encryption before S3 upload.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.