Skip to content

extract

Extract data from discovered Firebase paths.

Usage

bash
extract [--rtdb | --firestore] --path PATH [options]

RTDB extraction

bash
extract --rtdb --path users

Output:

json
{
  "user1": {
    "email": "[email protected]",
    "name": "John Doe"
  },
  "user2": {
    "email": "[email protected]",
    "name": "Jane Smith"
  }
}

Firestore extraction

Extract collection

bash
extract --firestore --path Users

Output:

json
{
  "documents": [
    {
      "DOCUMENT_ID": "user_alice",
      "name": {"stringValue": "Alice"},
      "email": {"stringValue": "[email protected]"}
    }
  ]
}

Extract specific document

bash
extract --firestore --path users --documentId user_alice

Save to file

bash
extract --rtdb --path users --output users.json
extract --firestore --path Users --output firestore.json

Options

--rtdb

Extract from Realtime Database.

--firestore

Extract from Firestore.

--path <path>

Path or collection to extract.

--documentId <id>

Specific Firestore document ID.

--output <file>

Save output to file.

Examples

Extract RTDB node

bash
extract --rtdb --path config

Extract Firestore collection

bash
extract --firestore --path users

Extract and save

bash
extract --rtdb --path users --output data.json

Extract specific document

bash
extract --firestore --path users --documentId user_123

See also