Operating System - HP-UX
1833412 Members
3445 Online
110052 Solutions
New Discussion

Re: TAR problemas - tape device space

 
Mauro_3
Advisor

TAR problemas - tape device space

I?m trying to use tar command to backup my files to a DDS-2 tape device, but there is not enough space to backup all files, so I want to compress files while backup them to tape without creating a temporary file in my disk, like Winzip do. Does bzip2 solve my problem ?
If it is true, where can I download bzip2 and manuals for HP-UX 10.20 ? Is there a option in tar command that allow to compress files while copying it to a tape device ?
Thanks, cheers, Mauro
9 REPLIES 9
Carlos Fernandez Riera
Honored Contributor

Re: TAR problemas - tape device space

By default DDS2 driver will compress your data, adding a compression before will be not a good idea.

How may GB are you saving?.
unsupported
Santosh Nair_1
Honored Contributor

Re: TAR problemas - tape device space

What device are you using to access the tape device? Most DDS devices have built in compression, so instead of using /dev/rmt/0m use:

/dev/rmt/c0t5d0BESTb

Otherwise, you can use gzip to compress the files before dumping them onto the tape. Gzip does a better job of compressing the files, but its much slower than the hardware compression on the tape.

-Santosh
Life is what's happening while you're busy making other plans
Andreas Voss
Honored Contributor

Re: TAR problemas - tape device space

Hi,

you could do this:

tar cvf - | gzip -c |dd of=/dev/rmt/0m obs=10k

For restore do:
dd if=/dev/rmt/0m ibs=10k | gzip -dc | tar xvf -

Regards
A. Clay Stephenson
Acclaimed Contributor

Re: TAR problemas - tape device space

The others have given you the compression pipelines but be advised that by default the compression device is used. If you send already compressed data to a compression device a small amount of expansion actually takes place. I would tackle this problem in a different way.

1) If you are not using 120m tapes already, get them to increase tape capacity.

2) Use fbackup rather than tar so that you can do incremental backups and much less freequent full backups that must span tapes.

3) Divide your backups so that they will fit on 1 tape.

If it ain't broke, I can fix that.
Mauro_3
Advisor

Re: TAR problemas - tape device space

I?m copying about 8GB and using the device /dev/rmt/0mn. I don?t have the device /dev/rmt/c0t5d0BESTb I have only /dev/rmt/c1t3d0BESTn. I?m really don?t know if it works...

Cheers, Mauro

Mauro_3
Advisor

Re: TAR problemas - tape device space

First I was using SAM and the command used was fbackup, but it is returns "exit code = 2" when I put it in a crontab to backup every saturday, so I try to do a tar and the message is "not enough space on tape device" or something similar. So, I?m lost.
Thanks.
Carlos Fernandez Riera
Honored Contributor

Re: TAR problemas - tape device space

Unless your data is compressed on disk, 8Gb must fit in 120M tape.

Use a cleanning tape twice, and use new tapes.
unsupported
Santosh Nair_1
Honored Contributor

Re: TAR problemas - tape device space

The device that I mentioned was only meant as an example. I guess on your system you should use /dev/rmt/c1t3d0BESTn.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Frank Slootweg
Honored Contributor

Re: TAR problemas - tape device space

Sorry to 'contradict' Carlos, but the Native Mode (uncompressed) capacity of a DDS-2 tape (120 meter) is 4GB. So if you (Mauro) get 8GB on a tape, you already have a compression factor of 2, which is quite good. It also means that, apparently, the hardware compression of the drive is working.

I doubt that using software compression will help. *If* you try software compression, you will probably have to disable hardware compression, because using two, different, methods of compression can often make things worse instead of better. See the mksf(1M) manual page on how to make a device file without (hardware) compression.