Operating System - HP-UX
1748152 Members
3385 Online
108758 Solutions
New Discussion

Re: tar Backup in commpresed mode

 
SOLVED
Go to solution
HP UNIX Professionals
Frequent Advisor

tar Backup in commpresed mode

Hi Experts,

I need to take a copy of one full file system have around 80 GB in DAT tape in HP UNIX Box.
But I have the DAT-4 tape having the capacity 20/40 GB only ( 40 GB in compressed state)
Is ther any compressed way to take backup in this DAT-4 tape, using tar.


Anybody know kindly guid me to take the backup.


Tape Drive Info
============

Ioscan –fnC tape

tape 1 0/6/1/0.2.0 stape CLAIMED DEVICE HP C5683A
/dev/rmt/1m /dev/rmt/1mnb /dev/rmt/c8t2d0BESTn /dev/rmt/c8t2d0DDSb
/dev/rmt/1mb /dev/rmt/c8t2d0BEST /dev/rmt/c8t2d0BESTnb /dev/rmt/c8t2d0DDSn
/dev/rmt/1mn /dev/rmt/c8t2d0BESTb /dev/rmt/c8t2d0DDS /dev/rmt/c8t2d0DDSnb

Thanks in Advance

10 REPLIES 10
Steven Schweda
Honored Contributor

Re: tar Backup in commpresed mode

> Anybody know kindly guid me to take the
> backup.

Uh, use more than one tape?

> [...] ( 40 GB in compressed state) [...]

That's an estimate. Some data are more
compressible than others. With my weak
psychic powers, I don't know how compressible
your data are. (Until you try compressing
them, you probably don't, either.)
Larry Klasmier
Honored Contributor

Re: tar Backup in commpresed mode

remember once you compress the data (softwarwe) you will not get additional compression from the hardware. In other words you are only going to get about 20GB on the tape once you have compressed the data. More often than not the hardware compression is better than the software compression. As already stated you mileage with respect to compression will vary depending on the data.
Andres_13
Respected Contributor

Re: tar Backup in commpresed mode

I think fbackup/frecover is a good choice for you.

And yes, probably you night need more than one single tape bocause of the file system size.

Regards!
Bill Hassell
Honored Contributor

Re: tar Backup in commpresed mode

> But I have the DAT-4 tape having the capacity 20/40 GB only ( 40 GB in compressed state)

You have been reading the marketing data...this tape will store no more than 20 GB. Unless you have a lot of compressible files, you'll need 4 or 4 tapes. Compression is not magic. Whether you use hardware compression (a better choice) in the tape drive, or HP-UX compression, there will be little difference. A compressible file has many, many repeating patterns such as spaces in a fixed length ASCII document (very unusual in HP-UX).

The average compressibility for HP-UX systems (vg00 for example) is 1.2 to 1.4. The only way to determine the compressibility of the 80 GB of data is to completely backup the files and then count the tapes. It's not possible to backup 80 GB of random data on one 20 GB tape.

fbackup will not make any difference over tar except for speed.


Bill Hassell, sysadmin
HP UNIX Professionals
Frequent Advisor

Re: tar Backup in commpresed mode

Hi Experts,

I got the solution by using the following command, But i don't know it will affect the data itself

#tar â cvf - /dat | gzip â -fast > /dev/rmt/1m
=======================================

/dat - Data in my server

/dev/rmt/1m - Tape Drive

=======================================

Thanks in Advance

Vinay
HP UNIX Professionals
Frequent Advisor

Re: tar Backup in commpresed mode

Hi Experts,

I got the solution by using the following command, But i don't know it will affect the data itself

#tar cvf - /dat | gzip --fast > /dev/rmt/1m
=======================================

/dat - Data in my server

/dev/rmt/1m - Tape Drive

=======================================

Thanks in Advance

Vinay
Steven Schweda
Honored Contributor

Re: tar Backup in commpresed mode

> I got the solution [...]

Rarely is "the solution" more than "_a_
solution".

> #tar cvf - /dat | gzip [...]

If the tape drive does compression, then how
valuable is gzip here?

If you ever wish to restore these data to
some location other than "/dat", then you
might be happier with a "tar" command using
relative paths rather than absolute paths.
For example:

cd /
tar cf - dat [...]
or:
cd /dat
tar cf - . [...]

Also, I tend to omit the "v" in most cases,
because the verbose listing tends to hide any
warning or error messages. Your choice, of
course.
Bill Hassell
Honored Contributor
Solution

Re: tar Backup in commpresed mode

> tar cvf - /dat | gzip --fast > /dev/rmt/1m

All of the device files listed with the word BEST and the device files 1m, 1mnb will perform data compression. The above command will compress the data in a similar manner in the computer then send the data to gzip which will be unable to compress the compressed data, resulting in the same or slightly BIGGER data to the tape. There will be virtually no difference between gzip compression versus dds tape compression -- you'll still need at least 2, probably 3 or 4 tapes to backup your data.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: tar Backup in commpresed mode

>I don't know it will affect the data itself
>#tar cvf - /dat | gzip --fast > /dev/rmt/1m

You may need to use dd(1) to reblock before writing to tape. Also, you would need to gunzip before using tar to read the tape.