To recover one document from a ZIP backup, identify its full path inside the archive and copy just that entry to a new file outside your working folder. Open the recovered document and look for a revision marker you can recognize, such as an approved meeting number or an annotated drawing. Two files called agenda.pdf can belong to different projects even inside the same backup.
Decide which copy you need before opening the archive
Suppose an April handover includes an agenda from the East office and another from the West office. Someone requests the agenda that assigned the lift inspection to West. You still have a more recent agenda in your project folder. Write down three things you already know about the missing version. Here they could be the office, the meeting number W-17, and a line assigning the inspection to June. That gives you a useful check even if the file was renamed on the way into the backup.
Keep the original ZIP where you found it. If it is on removable storage, you can read directly from the volume or copy the archive to the Mac first. A local copy makes sense if the drive disconnects intermittently. Check the copy finished before attempting recovery. If you have a checksum supplied with the backup, check it now. A match identifies the archive that was originally recorded. An archive that simply opens can still be an entirely different month’s backup.
This route uses Terminal and a working installation of Python 3 on the Mac. Enter the following command before making a working directory. If it reports that Python is unavailable, you can copy a small archive into an empty Finder folder, double-click the copy to expand it, and search the resulting folder tree instead. That approach creates copies of all the entries. Check available disk space if the ZIP contains media. The selective method is particularly useful when you want one small document from a known, much larger bundle.
python3 --version
Look at the names stored inside the ZIP
In Terminal, type the command below, replacing the sample path with the actual backup path. Dragging the ZIP from Finder into Terminal after typing the command and a space is a convenient way to insert a path with spaces. The listing operation reads the archive directory. It does not expand the contents into your working directory.
python3 -m zipfile -l "/Volumes/Backups/April handover.zip"
Read the entire path of each likely entry. In the example, East/Meetings/agenda.pdf and West/Meetings/agenda.pdf both end with the same filename. Look at the folder immediately above the file and also the higher project folder. A listing may have an extra top-level directory such as April handover. Include that directory if it is actually present. The path inside the archive is separate from the path to the archive on your Mac.
Pay attention to spelling, upper and lower case, spaces, and punctuation. ZIP entry names are strings stored by the program that created the archive. A name Finder treats as equivalent on your disk can still be a different entry in the ZIP directory. If the list shows only a folder ending in a slash, keep looking for the file beneath it. If the backup lacks the expected project path entirely, inspect an adjacent dated archive before opening an unrelated file that happens to have a similar name.
Read the listed uncompressed size as a plausibility check. A saved PDF with many diagrams is unlikely to have a size of zero bytes. A surprisingly large entry for a one-page agenda warrants a closer look. The compressed size of the ZIP in Finder tells you how much room the container occupies. To plan the output you need the size of the selected entry after decompression. This procedure is intended for an ordinary document in your own backup with an expected size.
Recover the selected entry to a fresh destination
Create a new, empty folder in Finder, for example West agenda recovery. Inside that folder you will create recovered-agenda.pdf. Give the destination an extension that matches the material you expect. Choosing a new output filename also means that a folder name or absolute path stored inside a ZIP cannot appoint a location on your Mac.
Save the following text as recover_one.py in a separate working folder using a plain-text editor. It accepts the archive, the exact stored entry name, and the output filename in that order. The script limits this particular recovery to a 100 MiB document. Choose a different limit deliberately when recovering an expected larger file and make sure the destination has room. A smaller document does not require a change.
from pathlib import Path
import shutil
import sys
import zipfile
archive, entry, destination = sys.argv[1:]
target = Path(destination)
with zipfile.ZipFile(archive) as bundle:
found = [info for info in bundle.infolist() if info.filename == entry]
if len(found) != 1 or found[0].is_dir():
raise SystemExit("Choose one unambiguous file from the archive listing.")
info = found[0]
if info.file_size > 100 * 1024 * 1024:
raise SystemExit("Larger than the document limit. Check the selection.")
with bundle.open(info) as incoming:
outgoing = target.open("xb")
try:
with outgoing:
shutil.copyfileobj(incoming, outgoing)
if target.stat().st_size != info.file_size:
raise ValueError("Recovered size differs from the stored size.")
except BaseException:
target.unlink(missing_ok=True)
raise
print("Recovered", entry, "to", target)
In Terminal, open the directory containing the script or supply its full path. For the West example, adapt each argument below to your listing and chosen recovery folder. Python 3.8 or later supports the missing-file option used during cleanup. The output directory must already exist. If the output filename is in use, the script stops before replacing it.
python3 recover_one.py "/Volumes/Backups/April handover.zip" \
"West/Meetings/agenda.pdf" \
"$HOME/Documents/West agenda recovery/recovered-agenda.pdf"
Two entries with precisely the same internal path can exist in a ZIP. Some archiving workflows append a new entry while leaving the earlier one in place. Choosing a match by name alone can silently select the wrong revision. The script refuses such a selection. Use an independently dated backup with an unambiguous entry where possible. If both entries in this one archive are valuable, keep the archive intact and have them treated as separate candidates, retaining their individual sizes and positions.
Decide whether you have the requested revision
Open the newly created file directly from the recovery folder. For a PDF, use Preview and check the first page, the page with the deciding detail, and the end of the document. Search for W-17, then read the sentence around inspection. A passing result for this example is an agenda for the West office where the identified meeting assigns the lift inspection to June. An East-office meeting that also mentions a June inspection is a different document.
Finder’s modification date for a freshly written file can show the recovery time. The stored ZIP entry date can reflect the last time a source file was edited, and a date printed inside an agenda can refer to the meeting itself. Keep these observations separate. When two archived candidates have identical dates at the precision displayed, use an internal revision number, signed-off paragraph, known attachment, or a previously recorded digest to distinguish them.
A checksum calculated today is useful for following the recovered bytes through a later handoff. It proves equality with an independently recorded digest only if you have a trustworthy value for the particular earlier revision. For example, if the project register holds the SHA-256 of the West agenda, run the command below against the recovered file. Compare the complete digest. If you have no reference value, save the path, archive entry and revision marker that supported your choice.
shasum -a 256 "$HOME/Documents/West agenda recovery/recovered-agenda.pdf"
Record the recovered bytes without confusing them with the archive
If you need to pass the recovered document to a teammate, keep the archive checksum and document checksum in separate fields. A ZIP digest covers the compressed archive and its directory, while the document digest covers the bytes saved to the recovery folder. Recreating a ZIP with different compression settings or file order can produce a different archive digest even when the agenda inside it is identical. Comparing a digest recorded for the container with a digest calculated for the PDF will never answer whether you recovered the required agenda.
For the West example, a practical receipt can identify the backup as the April handover, name the full West entry and state that the recovered copy contains meeting W-17. Add the document digest if the recipient needs to check their own copy later. A receipt can omit the names of other people and projects whose files happen to share the same archive. That keeps the record focused on the item you actually recovered.
Recover a companion file when the document refers to one
A successfully recovered document can still depend on another item in the backup. An agenda might say “use the attached access plan.” If the PDF opens and the attachment is missing, inspect the original listing before treating this as a damaged PDF. The plan might have been archived as a neighboring file, embedded as an attachment in the PDF, or distributed separately. Those possibilities call for different checks.
For a neighbor in the ZIP, first identify its full entry name under the same office and revision. Run the selective recovery again with that entry and a different output filename. Keep the two outputs together and read the revision on the plan itself. A path such as West/Meetings/attachments/plan.pdf is stronger evidence of a relationship than a matching basename in an East folder. Check whether the agenda states a drawing number that the plan also displays.
If the agenda has a relative hyperlink to the plan, a flat recovery folder may change where the application looks for it. Preserve the original relative directory layout in a separate test folder and place copies of both recovered files there. You can also open the plan independently if all the recipient needs is the drawing. This preserves a distinction worth recording at delivery: the referenced drawing was recovered, and the original link was tested only if you actually followed it in the reconstructed folder.
Handle a failed read or a document that opens incorrectly
If the script cannot find the archive, check the external volume’s name in Finder and repeat the listing from the exact path you passed. If the listing works and the script reports an ambiguous selection, compare the stored name character by character. A top-level project directory accidentally left out of the argument is enough to produce zero matches. Changing the output folder cannot repair an incorrect entry name.
An error about a bad ZIP or a failed integrity check can occur while opening the archive or while reading the selected member. An interrupted copy from removable storage is one possibility. Compare the local archive with the source, try reading a fresh copy, and retain a second backup date if available. An encrypted archive may require credentials and a compatible archive reader. Use the archive owner’s normal recovery method and keep the password out of notes, scripts and shared Terminal transcripts.
If the PDF opens but belongs to an earlier or later meeting, you have successfully extracted a file and still have a version-selection question. Name the recovery folder for that candidate and consult the next likely archive. Keeping candidates separate allows a side-by-side inspection and preserves the current project copy for comparison. Once the requested revision is confirmed, deliver a copy from the recovery folder and identify it by its meeting number and revision. The original ZIP remains available if another item from the handover is requested.