Click to See Complete Forum and Search --> : Problems with tar wasting free HD space


ferrantepunto
08-08-2003, 07:10 AM
Hi there,

I´ m having certain problems creating tar archives to a tape device. I have a partition with 33 Gb of data, and 2 Gb free. I issued a command to copy all this data to a tape device without problems. At a certain point, the tar job fails and I see that there´s no free space available on the hard disk. I believe that tar creates some sort of temp file to perform the backup to tape, but, now I can´ t recover the space wasted by the "temp" file(s) created by the failed tar job. I´ve searched the hard disk to see if I can find some big temp files, without success.

Another question is how much free space do I need to have to perform this kind of backups using tar?

Any ideas on how to recover this space? Any help will be greatly appreciated.

Cheers.

hard candy
08-08-2003, 07:22 PM
Can you use bzip, gzip, or zip to compress the data?

Icarus
08-08-2003, 07:33 PM
Tar is for archiving and does no compression by default. Try using tar with the -zcvf switch, I also have a brief tutoral on my site on using tar for backup.

ferrantepunto
08-09-2003, 05:47 PM
Thanks for your suggestions. The problem that I´m having is this: I have this SCSI RAID drive with 33 Gb of data, and 1,5 Gb free. I didn´t use any compression to make the backup to tape, I assume that the tape is using its own hardware compression (not sure about this). When the "backup job" fails, I check the drive with df only to find that I haven´t any free space left. Then, I believe that tar is creating some sort of temp files, but I´m not sure. Is there a way to determine which process, program or user is filling up the hard disk? Another question is, do I need to have free space left to get a tar "backup job" to work?, using or not using compression? If I use compression (tar.gz) for example, will tar need free space to create the compressed files to the tape?

Thanks again.

mdwatts
08-09-2003, 05:50 PM
What is the exact command you are using?

It's likely that it needs to first create the tar archive before even attempting to copy it to tape.

Do you enough free space on another drive that you could use?

ferrantepunto
08-09-2003, 06:51 PM
The command that I´m using is this:

tar -cvpMf /dev/tape /[0-9A-Za-oq-z]*

Two questions:

a. How can I find how much space do I need to perform the tar operation of aprox. 33 gb?

b. If tar creates a file before copying data to the tape, where can I find it? This is, as I said, it happened that the tar process stopped because lack of free space, and I think that this temp file is somewhere eating up my disk space. I´m not using compression.

Thanks again.

Icarus
08-09-2003, 08:28 PM
tar does all the work on the fly, no temp space used. You are not using any compression so it's going to use as much space as you put into it. Try
tar -zcvpMf /dev/tape /[0-9A-Za-oq-z]*

to use gzip compression