Skip to content

Be first in. Get early access

AttachKeep

All documentation

Nightly backups

Every night, AttachKeep copies the Airtable tables you pick into your own S3 or R2 bucket, as JSON and CSV, in a folder for each night, with a restore guide. AttachKeep keeps no copy of your data: the records pass through on their way to your bucket. Backups come with the Agency plan and the Workspace + Backups plan.

Set it up

  1. Add your bucket on the Bucket page, if you have not yet.
  2. Give the bucket's key permission to upload to and delete in the attachkeep-backups/ folder (below).
  3. On the Backups page, pick a base and tick the tables to back up. Repeat for each base.
  4. Tick Back up the picked tables every night, set how many days to keep, and save. AttachKeep writes the restore guide into your backups' folder at once, which also tests the key.

Back up tonight's tables now writes tonight's backup straight away, so you can see the files before the first night.

What each night writes

Backups go to attachkeep-backups/<your folder>/<base id>/<YYYY-MM-DD>/. Your folder's name has a random part (shown on the Backups page) that nobody can guess.

  • <table> (tbl…).json: every record of the table, with its record id, created time and each cell keyed by field id; the table's fields with their names, types and options. Linked record fields hold the linked records' ids.
  • <table> (tbl…).csv: the same records as a spreadsheet, one column per field by name. Linked records are their ids, attachments their file names.
  • schema.json: every table of the base, with each field's id, name, type and options, and the views.
  • RESTORE.md: the restore guide.
  • manifest.json: written last, with each table's record count. A folder without it is a night that did not finish.

Airtable's links to attachment files stop working after about two hours, so the backup keeps each file's id, name, size and type and leaves the link out. To keep the files themselves, add a rule for the attachment field on Bases and fields: AttachKeep copies each file into your bucket.

When it runs

Backups start at 02:00 UTC. AttachKeep reads each table 100 records at a time, at most 4 requests a second per base (Airtable allows 5). A night that fails (the bucket refused the file, Airtable did not answer) is tried again 30 minutes later, three tries in all; after that, AttachKeep emails you and tries again the next night. The Backups page shows each base and night, with the reason when something went wrong.

The calls count toward your Airtable plan's monthly API calls, like every integration's: about one call per 100 records, plus one for the schema, each night.

The key's permissions

Amazon S3

Add the backups' folder to the key's policy, with your bucket's name in place of YOUR-BUCKET:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:PutObject",
      "Resource": ["arn:aws:s3:::YOUR-BUCKET/airtable/*", "arn:aws:s3:::YOUR-BUCKET/attachkeep-backups/*"]
    },
    {
      "Effect": "Allow",
      "Action": "s3:DeleteObject",
      "Resource": "arn:aws:s3:::YOUR-BUCKET/attachkeep-backups/*"
    }
  ]
}

AttachKeep deletes only files it wrote into attachkeep-backups/, once a night is older than the days you keep.

Cloudflare R2

The Object Read & Write token for the bucket already allows it.

Who can open the backups

The backups hold whole tables, so keep them private. On S3, a public-read policy for the airtable/ folder does not cover attachkeep-backups/, so the backups stay private. On R2, a custom domain or the r2.dev address opens every file in the bucket to anyone who has its address; the random folder name keeps the backups hard to find, but a separate private bucket is safer for private data. See Links and privacy.

How long backups are kept

Set Keep each night for from 1 to 365 days (30 by default). Each night, AttachKeep deletes the folders of nights older than that. If the key may not delete, the Backups page says so and the old nights stay until it can.

Restore

Each night's RESTORE.md has the steps:

  1. In Airtable, import a table's CSV file into a new base or table, and check each column's field type against schema.json.
  2. Import every table first, then turn each linked column into a "Link to another record" field. The CSV holds record ids, which match only in the original base; in a new base, match on the primary field.
  3. Add files back from the copies an AttachKeep rule made, by URL.

For a script, use the JSON files with Airtable's Web API: create records 10 at a time, each cell keyed by field id (the same base) or field name (a new base).

Limits

  • A base's night is written in one run of up to about four and a half minutes, which fits about 100,000 records a base. A larger base may not finish; the Backups page says so.
  • Text that starts like a spreadsheet formula (=, +, -, @) gets an apostrophe in front in the CSV, so opening the file never runs it. The JSON keeps the exact value.
  • Disconnecting Airtable stops backups and deletes the settings; the backups already in your bucket stay, and AttachKeep no longer deletes them.