
A CAR file (Content Addressable aRchive) is a single file that holds an IPFS DAG: one or more root CIDs plus every block under them. You can back up, move, or hand over content as one archive. Each block keeps its CID, so whoever receives the file can verify it.
TL;DR:
.tar but built specifically for content-addressed dataipfs dag export writes a CID's entire reachable graph to a CAR file; ipfs dag import reads blocks back in and recursively pins whatever roots the file's header lists?format=car response, the same archive format used for backup and migration is also what makes gateway responses independently verifiableUpdated Oct 19, 2026: rewrote the post for readability, added the export and import commands, and added how to get a CAR file's content onto AIOZ Pin.
Every retrieval method this series has covered works one request at a time against a live network. Bitswap trades want-have and want-block messages, and a gateway answers plain HTTP requests. That suits browsing. It is the wrong shape when you want to back up a pinset, move content between two nodes on different networks, or hand someone a whole dataset. For those jobs you need the DAG packed into one self-contained file.
A CAR file has two parts. The header lists one or more root CIDs, which tell a reader where to start walking the graph. After the header comes a sequence of block records, and each record pairs a CID with that block's raw bytes. That is the whole CARv1 format, with no compression and no index. CARv2 wraps the same payload and can append an optional index for faster lookups.
ipfs dag exportTo turn a live CID into a CAR file, you run ipfs dag export with that CID. Kubo fetches every block reachable from the root and streams the result to standard output as a CARv1 file. Redirect that stream to a file and you have one archive holding everything under the root. For a UnixFS directory, that means every file and subdirectory block beneath it. Kubo's export takes a single root per file.
ipfs dag export <root-CID> > backup.car
ipfs dag import backup.carBoth commands are quoted from the Kubo CLI reference; we didn't run them for this post.
ipfs dag importGoing the other way, ipfs dag import reads a CAR file's blocks into your node's local blockstore. By default it also pins every root CID listed in the file's header, recursively. That is the same recursive pin this series' garbage collection article covers, triggered by an import instead of an upload. So handing someone the file is enough: their node can rebuild and pin the exact same DAG with no live link to you.
Every block in a CAR sits next to its own CID, so you don't have to trust whoever gave you the file. You can recompute each block's hash and compare it with the CID stored beside it. Any mismatch shows up locally, through the same check this series' content-verification article describes for live retrieval. A CAR from an unknown mirror is as verifiable as one from the original uploader.
This series' content-verification article showed how to ask a gateway for a CAR response instead of a finished file, with ?format=car or the right Accept header. That response uses the same CAR format described here. The only difference is delivery: a gateway streams it over HTTP, while an export saves it to disk.
You don't need AIOZ Pin tooling to export a CAR file. Point ipfs dag export at a pinned CID from any IPFS node that can reach it. The file you get is a complete, verifiable copy that stays usable without our infrastructure, which makes it a simple way to back up or migrate a pinset.
Importing works differently. Our docs list two ways to pin: upload a file or directory with POST /api/pinning/, or pin an existing CID with POST /api/pinning/pinByHash. They don't list a CAR upload. To get a CAR file's content onto AIOZ Pin, import it into an IPFS node you run, then send the root CID to pinByHash. Keep that node online until the pin completes, since the blocks have to be fetched from it. The request body from the docs looks like this:
POST https://api.aiozpin.network/api/pinning/pinByHash
pinning_api_key: KEY
pinning_secret_key: SECRET
{ "hash_to_pin": "CID", "metadata": { "name": "string" } }Next step: the AIOZ Pin pinning API reference has both endpoints with cURL, Node.js, Python, and Go examples.
What is a CAR file in IPFS? A Content Addressable aRchive: one file that packs a DAG's root CIDs and every block reachable from them. It is a header of roots followed by CID-and-bytes block records.
How do you create a CAR file from a CID? ipfs dag export <CID> walks the CID's full reachable graph and writes the result as a CAR-formatted stream, which can be redirected to a file.
How do you get content back out of a CAR file? ipfs dag import <file.car> reads the blocks into local storage and recursively pins whatever root CIDs the file's header lists.
Do you have to trust whoever gave you a CAR file? No. Every block sits next to its own CID, so you can hash-verify each one on import. It is the same trustless check that applies to any live IPFS retrieval.
Is a CAR file the same thing as a gateway's CAR response? Yes. Requesting ?format=car from a Trustless Gateway returns the exact same archive format described here, delivered over HTTP instead of saved as a standalone file.
Do you need AIOZ Pin tooling to export a CAR file of content pinned there? No. ipfs dag export works on any CID reachable on the public network, including content pinned on AIOZ Pin. Any IPFS node with access to it will do.

An IPFS dedicated gateway on AIOZ Pin is called a premium gateway. See what the free plan limits, what a paid plan adds, and what happens at zero balance.

Pin by CID asks a pinning service to fetch content already on IPFS and keep it. Covers the AIOZ Pin pinByHash call, statuses, and why a pin stalls on Pinning.

IPFS gateway not working? Read the status code first, then check the CID, your request rate, and whether anyone is providing the content. Here is the order.

ERC-1155 metadata on IPFS breaks when filenames ignore the {id} rule. Here is the exact 64-character format, a working folder layout, and the per-token option.

AIOZ Pin rate limits in one place: 180 requests per minute for the API, 15 per CID on the public gateway, and no predefined limit on premium gateways.

IPFS pin stuck on Pinning? Here is what Pinning, Pinned, and Failed mean on AIOZ Pin, why big directories can sit there, and how to read a pin's real state.