Operating System - HP-UX
1850216 Members
3293 Online
104050 Solutions
New Discussion

Re: Question regarding TAR

 
Binu_5
Regular Advisor

Question regarding TAR

Hi All

I have soem doubts regarding the tar backup utility.. Can anybody help me regarding this matter


1)Can we take encrypted backup in tar backup utility ....If not is there any freeware which I can take the backup
2)Can tar backup span accross tape

Thanks
Binu
6 REPLIES 6
Muthukumar_5
Honored Contributor

Re: Question regarding TAR

In default tar utility in hp-ux will not support encryption and tape spanning.

hth.

Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Question regarding TAR

For Q#1,
Yes, You can use crypt command and pipe it to tar.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Nico Schockaert
Trusted Contributor

Re: Question regarding TAR

Hello,

tar cvf - ./my_data | openssl enc -aes-128-cbc > /dev/rmt/0m

It prompts for a password, verifies it, and then completes the backup.

To restore from tape, the following command is performed:

openssl aes-128-cbc -d -in /dev/rmt/0m | tar xf -

It prompts for the password and continues the restore.

Hope this helps,

Nico
Stefan Stechemesser
Honored Contributor

Re: Question regarding TAR

Hi,

piping through encryption programs as in the posts above is basically possible, but:
Please keep in mind that tapes use streaming mode and if the encryption program is slower than the tape (I would expect this, because encryption is CPU extensive), then the tape have to rewind and start again which may be the cause of bad media and failed backups.

You don't have this problem if you save a backup to a block device (like a disk) before writing it to a tape (with dd).

best regards

Stefan
Bill Hassell
Honored Contributor

Re: Question regarding TAR

tar cannot span tapes and does not have any built-in encryption. tar also cannot backup files larger than 2Gb (8Gb limit with recent patches but these files cannot be restored on other systems without the same capability in tar). tar cannot recover from any tape errors. tar has no central index or table of contents (must read entire tape to list all files).

If you are reading into the description that tar is not really suitable for production backups, you're correct. tar is great for exchanging a few small files between machines, but only if the exchange is not critical. fbackup/frecover is much more reliable and much higher performance (but only available on HP-UX). A commercial backup program would be the next logical choice beyond the free tools on HP-UX.


Bill Hassell, sysadmin
Raj D.
Honored Contributor

Re: Question regarding TAR

Hi Binu ,

1) you can encrypt , once the tar backup completed , with pipe.

ex: # tar -cvf file1.tar * ; crypt cript_key < file1.tar > file1.crypt.tar

2) Tar cannot span across tape. You can use fbackup for that. Tar can take max 2GB file size and latest tar with patch makes it to support 8GB of file size.

Check your tar version:
# what /usr/bin/tar
/usr/bin/tar:
tar.c $Date: 2003/05/19 02:55:16 $Revision: r11.11/6 PATCH_11.11 (PHCO_
28992)
$Revision: @(#) all CUP11.11_BL2003_0522_1 PATCH_11.11 PHCO_28992
Thu May 22 03:24:02 PDT 2003 $

This Will support max 8GB file size.
----------------------------------------

You can also get the latest tar from
http://hpux.cs.utah.edu , that also dosupports for large files.


Hope this will help you.

Cheers,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "