1846684 Members
4265 Online
110256 Solutions
New Discussion

Re: tar

 
SOLVED
Go to solution
Madhu Sudhan_1
Respected Contributor

tar

Hi Guys !
I was just using tar to archive a filesystem of 43 GB.
I used the command this way
#tar cvf ./fwprod.tar ./
It just archived 39GB and exits with
and Error message

tar: size of ./fwprod.tar > 2GB Not dumped.

Iam using
HP-UX 11.0 N4000 -Class Box
EMC

Any inputs are appreciated.

Thanks,
...Madhu

Think Positive
9 REPLIES 9
Madhu Sudhan_1
Respected Contributor

Re: tar

I got the answer guys. It looks like tar command has limitation of 2gb and that it is trying to archive fwprod.tar which is in the current directory which is > 2GB.

Another Question is.
How do I know what all the directories it has tared and which are not ? tar tvf takes a long Is there any other way ???

Thanks,
...Madhu
Think Positive
James R. Ferguson
Acclaimed Contributor

Re: tar

Hi Madhu:

Tar (and cpio) do NOT support files that are larger than 2GB. See the man pages for 'tar'. I prefer 'fbackup/frecover' for most backup/restore tasks for its sheer flexability.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: tar

Madhu:

Take a look at the man pages for fbackup/frecover. fbackup is designed to be used on filesystems with active files. It tracks the timestamp of a file as it begins a backup and compares it to that at the end. If the file has changed, fbackup will retry (maxretires) times.

Files to backup are controlled by a "graph" which can be a simple ASCII file containing file and/or directory names to include (-i) and exclude (-e). You can easily define directories to backup while excluding subdirectories and/or individual files. Full as well as incremental backups are supported.

Fbackup and frecover can be executed with verbose (-v) logging. Redirecting or tee-ing the this output into a log of your choice allows you to create a record of what was backed-up. Alternately, frecover can be used to create a tape directory listing without recovering anything.

Regards!

...JRF...
Dan Hetzel
Honored Contributor

Re: tar

Hi Madhu,

Look at your command:
#tar cvf ./fwprod.tar ./

It creates the file ./fwprod.tar and then starts reading the ./ directory to begin archiving.
At a given time in the process, it will start reading ./fwprod.tar and try to archive it as well.
I didn't test it, but there's a good chance that this will turn into an endless loop, whatever the global size of date you're writing on the tape.

You'd better, either be more selective in choosing what to archive, or put your archive file in a different location.

;-)

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Dan Hetzel
Honored Contributor

Re: tar

Hi Madhu,

As I was curious to see if the 'tar cvf ./fwprod.tar ./ ' would give an error or warning, here is what I got:
./fwprod.tar: file changed size

A 'tar tvf ./fwprod.tar' was anyway showing ./fwprod.tar as a file in the archive.

So, tar is not looping endlessly but contains data that shouldn't be there...

;-)

Best regards,

Dan


Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Tommy Palo
Trusted Contributor
Solution

Re: tar

Just a tip:
If you use gnu tar you can also have zip as an option to tar, thus directly reducing the size of the archive a lot.
/opt/tar/bin/tar cfz //fwprod.ztar ./
Keep it simple
Cheryl Griffin
Honored Contributor

Re: tar

/usr/share/doc/lg_files.txt:

"4.2.1 tar, cpio, pax, ftio

Some of the backup commands, specifically tar, cpio, pax (tar & cpio formats), and ftio (because it creates cpio format archives) are
restricted from supporting large files due to standards defined headers in the archives. Although the headers allow archival of files
upto 8GB, there is no guaran- tee that there will be no attempt to restore these files on a system that does not support large files. These commands will therefore support files up to 2GB only. Attempts to archive any files >2GB will fail, and the files will not be added to the archive."
"Downtime is a Crime."
Dan Hetzel
Honored Contributor

Re: tar

Madhu,

As you were trying to archive 43GB of data in the same filesystem, are you sure that there is more than 43GB of free space in the same filesystem.

If this is really what you want to do, change your command to:
#tar cvf ./fwprod.tar ./!(fwprod.tar)

This works in posix shell and would at least avoid to archive the archive... ;-))

Should work in ksh as well.

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Shannon Petry
Honored Contributor

Re: tar

Dan, I think you are wrong about tar trying to archive the "tarfile" as well. My understanding is that tar expands the shell command and generates the list prior to creating the archive and appending data to it.
While I have never done a 43GB file, I have made loads and loads of archives in the same directory as what I am archive and never gotten the tarball in the archive or looped up....

Just my 2 cents worth.....

Also, I prefer as someone else mentioned GNU tar. There is no 2GB file limit, and you also can compress data prior to adding it to the archive. If your like me and too cheap to buy software, use what works.
Its the choice of a gnu generation!

Regards,
Shannon
Microsoft. When do you want a virus today?