I have a problem, in that I am trying to generate a zip archive of whole file systems' worth of data (multiple gigabytes, lots of files). If I use zip or tar from the command line, this is fine. But I don't want to pick every file; ideally I want a perl module to do the archiving and compression function, writing out to disk as It goes.
I have tried Archive::Zip, and this worked for a small test set. But when it comes to full production size, the process gobbles up more and more memory, as the module is building the archive in memory, until I get failures to add files - the program exits without leaving behind a valid zip archive. Several hours wasted :(.
As an alternative, I could pipe filenames to a command line utility, but I was hoping to do this all in perl.
I know that Archive::TarGzip is capable of reading individual files from an archive without slurping the entire archive into memory. What I am looking for is the equivalent for writing an archive. If there is no archive module that can work on disk rather than all in memory, I might have a go at writing one.
--
I'm Not Just Another Perl Hacker
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.