[H-GEN] Encrypting a tar backup

Andrae Muys amuys at contal.net.au
Wed Oct 23 01:40:16 EDT 2002


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Harry Phillips wrote:
> What I am concerned about is if the CD fell into the wrong hands. I want
> to be able to see the file on the CD but be unable to extract the
> contents without a password.
> 
> If I have to create another file that contains the tarball and burn that
> onto the CD, that fine, as long as the file is protected.

tar does exactly one thing.  It bundles files together to a stream in a way 
that ensures they can be unbundled later.  Compression is tradtionally 
handled by either compress, or gzip (.Z vs .gz).  Compressing tar files is 
so common that GNU provide -Z and -z options to automatically invoke 
compress/gzip on your behalf.

What this means is, you are going to have to find/pick an encryption 
program and use it to encrypt the tar/tgz file.  This is where the shell 
programming facilities of Unix I mentioned the other day become important. 
  You can very easily combine tar with other programs using pipes to add 
extra features to the 'application' as and when you require them.  If you 
will require those features alot you can install them into your shell by 
adding an alias line to your .profile (I believe bash uses a 
.bash_profile).  Or you can bundle the script into a file with the first line

#!/bin/sh

and it then becomes a shell-script, in most ways indistinguishable (sp?) 
from a binary application.

Andrae Muys

P.S.  Anyone want to do a talk on very basic shell-scripting?

P.P.S. Would it be worth reserecting the 'adopt a shell utility' series of 
talks proposed a few years back?



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list