# Nightly Airtable base backup to Amazon S3

> Copy every table in an Airtable base to Amazon S3 as CSV in a timestamped folder each night, with a manifest for easy restores.

- Workflow type: code
- Services: Airtable, Amazon S3
- Categories: Operations, Engineering
- Published: 2026-07-17

## What it does

- Runs on a nightly schedule (default 2 AM) and archives your entire Airtable base to Amazon S3.
- Saves every table in the base as its own CSV file inside a dated folder, so each night is a separate snapshot.
- Writes a small manifest file alongside the tables that records what was backed up, when, and how many rows.
- Gives you a self-documented history of your base that you can restore from later without guesswork.

## What you'll need

- An Airtable base you want to back up, and access to that Airtable account.
- An Amazon S3 bucket to store the backups in, plus AWS credentials that can write to it.
- The Airtable base ID for the base you want to archive (found in the base URL).

## Prompt

Every night at 2:00 AM, back up an entire Airtable base to Amazon S3 in a timestamped folder for offsite recovery and long-term retention. Build this as a deterministic code workflow: every step is a known operation over structured inputs, no reasoning required.

Trigger: cron, once per day at the configured time (default 02:00 in the workflow's timezone).

Step 1. Call Airtable Get Base Schema for the configured base ID to enumerate every table (id, name, and field list) currently in the base.

Step 2. For each table returned by the schema, call Airtable List Records and follow the offset-based pagination until every record has been fetched. Serialize the accumulated records into a CSV string: a header row of field names in the order returned by the schema, then one row per record. Coerce array and object cell values (multi-select, linked records, attachments) to a stable JSON string so the CSV is deterministic. Track the row count for the manifest.

Step 3. Upload each table's CSV to Amazon S3 with Put Object at the key path airtable-backups/<baseId>/<YYYY-MM-DD>/<tableName>.csv, where <YYYY-MM-DD> is the run's UTC date and <tableName> is URL-safe (replace slashes and spaces). Set Content-Type to text/csv.

Step 4. After every table has uploaded, write one more object with Put Object at airtable-backups/<baseId>/<YYYY-MM-DD>/manifest.json containing the run timestamp (ISO 8601), the base ID, and an array of { tableId, tableName, keyPath, rowCount } entries so a future restore is self-documenting. Set Content-Type to application/json.

Configuration surface exposed to the user: Airtable base ID, S3 bucket name, S3 key prefix (defaults to airtable-backups), and the time of day the cron fires.

Operations used: Airtable Get Base Schema, Airtable List Records (with pagination), Amazon S3 Put Object.

## How to customize

- Change the time of night the backup runs (defaults to 2 AM).
- Point it at a different Amazon S3 bucket, or a different folder inside the bucket.
- Swap in a different Airtable base ID to protect multiple bases with their own copies.

## FAQ

### Will this back up every table in the base?

Yes. It reads the base's structure first and then archives every table it finds as its own CSV file inside that night's folder.

### Does it back up attachments and file uploads?

It exports the table data as CSV, so attachment fields contain the file URLs from Airtable rather than the raw files themselves. The URLs stay valid as long as the underlying attachments remain in your Airtable account.

### How much Amazon S3 storage will this use?

Each run is a full snapshot, so storage scales with your base size and how many nights of history you keep. You can layer S3 lifecycle rules on top to move older snapshots to cheaper storage tiers automatically.

### Can I restore just one table?

Yes. Each table is its own CSV inside the night's dated folder, so you can grab a single file rather than pulling the whole base.

### What happens if the backup fails partway through?

The manifest file records exactly which tables made it into that night's folder, so you can tell at a glance whether a snapshot is complete and worth restoring from.

Use this prompt in General Input: https://www.generalinput.com/prompts/nightly-airtable-base-backup-to-amazon-s3