To compress the directory todays_backup with protection do the following:

# tar -zcf – todays_backup|openssl des3 -salt -k yourpassword | dd of=todays_backup.des3

To extract your protected archive file todays_backup.des3 use the following command:

# dd if= todays_backup.des3 |openssl des3 -d -k yourpassword |tar zxf -

This is useful to post sensetive information to on-line back up storage like adrive.com

instead of

tar -z

, i would rather use

 tar --lzma

Also, one can use this:

 openssl des3 -salt -k passwd < file.tar.lzma > file.tar.lzma.des3 

and

 openssl des3 -d -k passwd < file.tar.lzma.des3 > file.tar.lzma 

The information is summarized from this post. Also this one is relevent.

Advertisements