|
From: | Matt Olson |
Subject: | Re: [Bug-tar] Add an option to tar, --use-encrypt-program |
Date: | Thu, 20 Jan 2011 14:38:15 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 |
Hi Paul, Some have hacked use of tar to allow encryption by calling a wrapper script for openssl using --use-compress-program option. Example: /bin/tar -c -v --use-compress-program /usr/local/bin/do_crypt.sh -f /dev/nst0 /data This works fine. The problem is when using tape spanning (-M / --multi-volume). /bin/tar -c -v --use-compress-program -M --tape-length=1006632960 /usr/local/bin/do_crypt.sh -f /dev/nst0 -f /dev/nst1 /data Results in error: /bin/tar: Cannot use multi-volume compressed archives This makes perfect sense. When using compression, it is unknowable in advance at what point in tarring the source data "tape-length" will be reached. In other words, it is not possible to predict what the compression ratio will be in advance. Hence this tape spanning scenario creates a problem when attempting to use an encryption program instead of a compression program. Proposed solution is to create an option like --use-compress-program which streams the data through an external program, yet allows use of -M option. Does that make sense? Since my last e-mail, I pulled down the source for tar and started looking through it. It's not quite as straight forward as I had assumed since --use-compress-program is essentially an override of -z (gzip), -j (bzip2), etc. I was hoping to re-use the --use-compress-program code and just remove the -M check. --Matt --
On 01/19/2011 11:54 PM, Paul Eggert wrote: Thanks for the suggestion. Could you explain that exception in a bit more detail? Also, what should happen if --use-encrypt-program and --use-compress-program are both specified? |
[Prev in Thread] | Current Thread | [Next in Thread] |