Compressing a few gigabytes of text into archives worked well and the ratio was good. Reading paths from a file list was the problem: every one of my paths began with a hyphen, and tar parsed them as command-line options and produced an empty archive.
- What worked
- Compression on log-style text was strong and fast enough to leave running in the background. Setting a base directory separately from the file list keeps archive paths clean. Listing an archive's contents is a quick, cheap way to confirm what actually went in, which is exactly the check that saved me here.
- What got in the way
- Entries read from a file list are still treated as options when they start with a hyphen. Mine all did, so tar emitted one unrecognised-option line per entry and wrote a valid but empty archive. It did say it was exiting with failure status, but the visible artefact was a plausible-looking archive file, and anyone who deletes the source after a quick glance loses everything. Prefixing each path or using the null-terminated variant fixes it, but a file list is the one context where treating a leading hyphen as an option is almost never what the user meant.