Join GNU tar Multi-Volume Archives with tarcat

tarcat stitches a set of GNU tar multi-volume files back into one ordinary archive, in the exact order you give it. This walks through picking the right volumes, joining them, and checking the table of contents before you extract anything for real. The installed tarcat is a small command built for exactly this job: it concatenates archive pieces and writes the combined archive to standard output.

Allow about 10 minutes if the volume files are already on disk. You need the GNU tar volume files, enough free space for the reconstructed archive, and permission to read the sources and write the destination directory. No elevated privileges are needed for files you can already read; do not use sudo merely because the command happens to live in /usr/sbin.

1. Identify the inputs

Make a private working directory and list the candidate volumes. Replace the placeholder directory with the location that actually holds your files:

cd /path/to/archive-directory
ls -lh volume-*.tar

Use the volume order recorded by whoever produced the archive. A filename sort helps when the names have zero-padded numbers, such as volume-01.tar, but it is not proof the files belong together. Check the sizes and timestamps too, and confirm no volume is missing.

Do not pass a wildcard until you have inspected what it actually expands to. A stray tar file in the same directory can end up inside the output, and a missing middle volume can leave an archive that looks plausible but cannot be read completely.

2. Join the volumes

Pass the first volume, then every later volume in order, and redirect standard output to a new destination file:

tarcat volume-01.tar volume-02.tar volume-03.tar > restored.tar

tarcat does not ask for an output filename and does not extract files itself. The redirection creates or replaces restored.tar, so choose a fresh pathname while testing. Archive bytes go to standard output; diagnostic messages from the underlying reads go to standard error.

This is ordinary file I/O and never touches the input volumes, but a destination file sharing a name with an input is unsafe: the shell opens the output before tarcat reads its arguments. If you pick the wrong output by accident, stop and remove only that newly-created file after checking its path. The original volumes remain your recovery copy either way.

3. Verify before extraction

Ask GNU tar to read the reconstructed archive without writing any member files:

tar -tf restored.tar

Expected output is one member name per line, for example:

etc/example.conf
var/lib/example/data.db

For a stronger check, list verbosely and check the command status. A complete archive should return status zero:

if tar -tvf restored.tar > restored-list.txt; then
    echo "archive listing succeeded"
else
    echo "archive is incomplete or unreadable" >&2
    exit 1
fi

Listing checks the tar structure and headers. It does not prove every extracted file is semantically usable, and it does not authenticate the source volumes. Treat member names and file metadata as untrusted until reviewed, if the archive came from anywhere you do not fully trust.

Why the order matters

GNU tar multi-volume archives are not independent tar files you can join in any order. tarcat examines the first block of the first input, then processes the remaining arguments in sequence, and depending on the archive format it may skip volume or extended-header metadata while joining the pieces. That is why the tool beats a blind cat for GNU tar multi-volume input.

Do not confuse this with combining unrelated tar archives. If each file has its own complete tar header and end markers, concatenating them is a different operation entirely, and can produce surprising listing or extraction behaviour. tarcat is for the pieces of one GNU tar multi-volume archive, nothing else.

Common failures and recovery

Done means