Chugalug Linux Users Group- Restarting bunzip2
CHUGALUG
Chattanooga
Unix Gnu
and Linux
User Group
Recent Keywords:
From: Eric Wolf ------------------------------------------------------ I've googled. I've RTFManpage. It doesn't seem possible, so I'm asking you guys: Is there a way to decompress part of a file with bzip2 and restart the process later? I have a 26GB file that decompresses to about 500GB. Unfortunately, my only storage device with that much capacity right now is a USB drive. I've done this before and it takes about 36 hours to decompress the file. Since it's going to USB, my CPU pegs almost the entire time so my machine is unusable. I'd really like to split the job up over a few nights. To make matters worse, the file was actually made with pbzip2. So I can't just write my own decompressor in Python with the bzip2 library (which doesn't support segmented bz2 files). -Eric -=--=---=----=----=---=--=-=--=---=----=---=--=-=- Eric B. Wolf 720-334-7734

=============================================================== From: wes ------------------------------------------------------ the closest thing I could think of is you can either suspend it during the day and resume it at night, or re-nice the process so it runs continually and your machine is still usable. I don't know about the bzip format specifically, but generally compression is not sequential, so you can't start at the end of a file. another idea I just came up with is, if you have a list of the files, you could script extracting them one at a time, and extract a list of them each night. I'm pretty sure that's supported in bzip. -wes

=============================================================== From: Eric Wolf ------------------------------------------------------ Unfortunately it's one big file. I hadn't thought about using nice to manage the job. That'd probably work. -Eric -=--=---=----=----=---=--=-=--=---=----=---=--=-=- Eric B. Wolf 720-334-7734

=============================================================== From: wes ------------------------------------------------------ another thought - uncompress it locally, and then move the uncompressed file to the USB drive in pieces. -wes

=============================================================== From: James Nylen ------------------------------------------------------ Another vote for suspending the process when needed (kill -STOP / kill -CONT) and/or using nice/renice.

=============================================================== From: James Nylen ------------------------------------------------------ Oh, here's another idea: schedtool -B -n 1 -e ionice -n 1 your