Select Page
How to View Meta-Data Backups

How to View Meta-Data Backups

On2Air Help CenterOn2Air Help Center > On2Air BackupsOn2Air Backups Start a free trial

In this tutorial, you’ll learn how to use On2Air Backups to backup and view your Airtable base meta-data. Meta-data is the “data about the data”, including your Airtable base structure and how it’s built, like table names, IDs, field names, field types, field IDs, number of fields, and more.

image
💡
What is On2Air Backups?

On2Air Backups creates automated backups of your Airtable data and sends the data to your storage drive in Google Drive, Dropbox, and Box. Get a free backup

In this tutorial

🎥 Tutorial Video

IN PROGRESS

How to Create Your Airtable Base Meta-Data

There are 2 ways you can get your Base meta-data. Either option is available to use.

  • Meta.json File in Every Backup
  • Script Added to the Scripting Extension in Your Base

Option 1 - Meta.json File in Backup Files

You’ll need to have a completed backup from On2Air Backups in your storage drive to view your base meta-data. These are automatically included with any backup.

Each Airtable base includes an individual meta.json file. A json is used to structure data. Whether your Backup Project has one or multiple Airtable bases, each base will have its own meta.json file with the meta-data to that Base alone.

  • Once your Airtable data is backed up, you’ll have a file in your cloud storage labeled meta.json
  • image
  • Open the meta.json file -
    • The file will look similar to this example, but with your Airtable base information
    • image
  • Copy the entire contents of the file
    • You may need to download the meta.json file and open it in a text viewer like Notepad if you’re unable to copy it or you can’t paste it into our Meta viewer field in the next step
    • image
  • In the On2Air Backups app, click on Meta Viewer in the menu

image
  • Paste the meta.json data into the Paste Meta Info field

image
  • Click Process
  • You’ll then see your Airtable base meta-data
image

Option 2 - Script Added to the Scripting Extension in Your Base

Add the Scripting Extension to the Base where you need meta-data

  • Copy this script into the Scripting Extension and click Run

Link to Script

SCRIPT

/**
 * On2Air Backup Scripts
 * Owned by On2Air.com
 * All rights reserved.
 * Copyright 2023
 * 
 */

output.markdown("# On2Air Backups Scripts")
output.markdown('##### Scripts assocated with On2Air: Backups. All rights reserved.')
const tools = ['Meta','Attachments']
const tool = await input.buttonsAsync('Select Tool', tools)
if(tool === tools[0]){
    //meta
    output.markdown("# Meta Data - Copy Full Data Below")
    output.text(JSON.stringify(base, null, 2))
    // output.text()
    
}else if(tool === tools[1]){
    const table = await input.tableAsync("Select Table containing attachments")
    const attFields = table.fields.filter( f => f.type === 'multipleAttachments')
    output.markdown("# Select an Action")
    const options = ['Display Field IDs', 'Search by Record', 'Search by Att']
    const selection = await input.buttonsAsync('Select', options)
    const index = options.indexOf(selection)
    switch(index){
        case 1:{//by record
            output.markdown("## Search by Record Name")
            const recMatch = (await input.textAsync("Enter Search")).toLowerCase()
            const records = (await table.selectRecordsAsync({fields:attFields})).records
            output.table( records.filter( r => r.name.toLowerCase().includes(recMatch)).map( r => {
                const out = {id:r.id,name:r.name}
                for(let af of attFields){
                    out[af.name] = (r.getCellValue(af) || []).map( a => a.id + "\t|\t" + a.filename).join("\n")
                }
                return out
            }) )
            break;
        }
        case 0:{//att field
            output.markdown('## Attachment Fields in Table: ' + table.name)
            output.table( attFields.map( af => ({name:af.name, id: af.id})))
            break;
        }
        case 2:{//search by att id
            output.markdown("## Attachment Search")
            const recMatch = (await input.textAsync("Enter Search by Att Value")).toLowerCase()
            const records = (await table.selectRecordsAsync({fields:attFields})).records
            const matches = []
            records.forEach( r => {
                for(let af of attFields){
                    const items = (r.getCellValue(af) || [])
                    for(let item of items){
                        if(item.id.toLowerCase().includes(recMatch) || item.filename.toLowerCase().includes(recMatch)){
                            matches.push({record_id: r.id, name: r.name, field_id: af.id, field: af.name, att_id: item.id, att_name: item.filename})
                        }
                    }
                }
            })
            output.markdown("## Matching Attachments")
            output.table( matches )
            break;
        }
    }
}
  • Paste the Script that was generated into the Meta Viewer field in On2Air Backups

How to Navigate the Meta Viewer

Now that you have your meta-data, you can view more details.

  • You can click on any Table, Field, View, or Options to see more details about each item.

See a full list of meta-data info included below

What Meta-Data is included in On2Air Backups?

On2Air Backups Airtable Meta-data includes:

Base Overview meta-data

  • Base Name
  • Base ID
  • Base Description
  • Table Names
  • image

Table meta-data

  • Table Names
  • Table IDs
  • Table Description
  • Primary Field Name
  • Number of Fields
  • Number of Views
  • View Names

image

Field meta-data

  • Field Name
  • Field Type
  • Field ID
  • Field Description
  • Select Field Options
  • image

View meta-data

  • View Names
  • View Types
  • View IDs
  • Fields inside Views
  • image
    image

Linked Record Field meta-data

  • Linked Table Name
  • Is Reversed - True/False
  • Prefers Single Record Link - True/False
  • Inverse Link Field Name
  • Inverse Link Field Prefers Single Record Link - True/False

image

Lookup Field meta-data

  • Is Valid - True/False
  • Record Link Field Name
  • Field in Linked Table Name
  • Result Type
  • Linked Table Name
  • Linked Table
  • Lookup Field ID
  • Lookup Field Type
  • Lookup Field Name
  • Lookup Field Option Names
  • Lookup Field Option IDs
  • Lookup Field Option Color
  • image
    image

Single Select Field meta-data

  • Field Name
  • Select Field Options
  • Select Field Option Name
  • Select Field Option ID
  • Select Field Option Color
  • image

Attachments

  • Multiple attachments
    • Is Reversed - True/False
    • image

Created Time

  • Type - Date or Date/Time
  • Date Format Name - Local, Friendly, US, European, or ISO
  • Date Format - example: M/D/YYYY
  • Time Format Name - 12/24 Hour
  • Time Format - example: h:mm:a
  • Time Zone option - Client
  • image

Currency

  • Precision
  • Symbol
  • image

Checkbox

  • Icon Type
  • Icon Color
  • image

Formula

  • Is Valid - True/False
  • Actual Formula
  • Referenced Field Names in Formula
  • Reference Field IDs in Formula
  • Result Type
  • Formula Formatting Precision
  • Formula Formatting Symbol
  • image

Number

  • Precision - digits shown to the right of the decimal point for this field
  • image

Date

  • Date Format Name - Local, Friendly, US, European, or ISO
  • Date Format - example: M/D/YYYY
  • image