Exports the full schema and all table data from a base. By default,
attachments are downloaded to disk (attachments = "file") since the
purpose of a dump is to create a full backup.
Arguments
- base_id
Base ID (e.g.,
"appXXXXXX"). IfNULL, uses the session default set byair_set_base()or theAIRTABLE_BASE_IDenvironment variable.- dir
Directory to write files to. When
format = "json"orformat = "csv", schema and data files are written here. Whenattachments = "file", attachment files are saved under{dir}/attachments/{table_name}/{record_id}/{filename}. IfNULLand format is"json"or"csv", uses a temp directory.- format
One of
"list"(return as R list),"json"(write JSON files), or"csv"(write CSV files with flattened complex types).- attachments
How to handle attachment fields:
"meta"(default) keeps only metadata (filename, url, size, type);"file"downloads toattachment_dir;"blob"downloads as in-memory raw vectors.- .token
Personal access token (resolved via
air_token()ifNULL).
Value
For format = "list": a named list with schema and a tibble per
table. For format = "json" or "csv": the directory path (invisibly).
Examples
if (FALSE) { # \dontrun{
# Full backup with attachments
air_dump("appXXXXXX", dir = "backup/")
# Quick dump without downloading attachments
air_dump("appXXXXXX", dir = "backup/", attachments = "meta")
# CSV dump (flattened for spreadsheet compatibility)
air_dump("appXXXXXX", dir = "backup/", format = "csv")
} # }