I've just been handed a pile of LTO-5s and a tape library, and the exciting task of extracting a subset of files.
Order of magnitude is 60 tapes from said pile, around 10,000 files of 70,000 per tape (in maybe half a dozen or a dozen asstd directories) that I need to pull. Tape library is running tar 1.23
I do have pre-existing dumps of each tape's content as per tar --list
so i'm happy to reconcile this with my list of files I need to pull so I can feed in a proper stream of records to grab, but
tar -xvf /dev/nst0 -b $file_to_pull
doesn't halt until i get to the end of the tape. Which makes sense - tar might be fed a wildcard pattern so it just goes to end of archive.
I guess I could solve this by just feeding in the directory glob and purging unwanted files once they're off tape, but I can't help but think there's got to be a way to halt tar at the EOF boundary and skip the purge step. Right? In all my hunting however, I've not found anything of that nature though..
So, questions:
Is there a way to get tar (or heck, anything else) to pull just one file from wherever the tape head is, and then stop? Or to signal tar once it's gotten an EOF and stop?
Alternately, am I mentally attacking this an odd way? Happy to take alt suggestions if anyone's got them.
Noting of course, this isn't a problem that's unsolvable right now, just my current options seem to be really awkward - this is the first time I've really had to deal with tape at this magnitude (and our other tapes are all LTFS)