The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   backups using tar: are there any limitations? (http://hintsforums.macworld.com/showthread.php?t=79820)

baf 10-30-2007 04:21 PM

You seem to have at least two tars installed so the result depends on which one it finds.
in terminal do:
sudo find / -name tar -print

and then try each with
/path/to/it/tar --version

Then use the full path in your crontab.

cocotu 10-30-2007 05:07 PM

running sudo find / -name tar -print
I got:

/usr/bin/tar

then I did: /usr/bin/tar --version, and got:

tar (GNU tar) 1.14 +CVE-2006-0300 +CVE-2006-6097
Copyright (C) 2004 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.
Modified to support extended attributes.

baf 10-30-2007 05:41 PM

Hmmm then I dont understand how you could see tar-1.18 as you said in post #20 ?

Ok looks like you will have to download the source and compile it like I showed in an earlier post. I still dont know if it will help but it wont hurt at least.
Oh use 1.19 instead not 1.18 as i said earlier.

And if that doesnt help I'll fix you a shell script that makes one tgz file from each directory.

But I wont do that until you have tried with a newer version becuse now I'm curious.

And I tested with 1.19 on a linux box and it seemed ok with a 130G+ tar file. So it may be a problem only on osX or with that 1.14 version of tar.

hayne 10-30-2007 06:16 PM

I note that the error messages shown in post #1 seem to indicate that the problem is with the memory used by 'tar', not with the disk space taken up by the file which tar is trying to produce. So the problem may have more to do with the structure of the files & folders that are being tar'ed than with the total size. I.e. it looks like 'tar' is exceeding some maximum-allowed amount of memory.

Hal Itosis 10-30-2007 08:35 PM

type -a tar

will find multiple occurrences, as well
as aliases (where options might be set).

-HI-

cocotu 10-30-2007 09:57 PM

After running tar again I got:

tar(27702) malloc: *** vm_allocate(size=8421376) failed (error code=3)
tar(27702) malloc: *** error: can't allocate region
tar(27702) malloc: *** set a breakpoint in szone_error to debug
tar(27702) malloc: *** vm_allocate(size=8421376) failed (error code=3)
tar(27702) malloc: *** error: can't allocate region
tar(27702) malloc: *** set a breakpoint in szone_error to debug
tar: memory exhausted

hayne may be right. After typing type -a tar I got:

tar is /usr/bin/tar

thanks for all the help. Do you think I should use zip instead of tar?

cocotu 11-03-2007 08:38 AM

tar 1.18 worked!
 
baf, tar 1.18 worked fine! Why doesn't the tar website specifies this? or maybe I didn't see that info. thanks for the help!

baf 11-03-2007 11:54 AM

Ah interesting. Possibly it's a bug fix that they even didn't know would fix this? Sometimes fixing one thing solves other problems you didn't know about. Or it could be that the act of compiling it yourself solved it. Perhaps apple used some different settings ?
But glad we finally solved it.

P.S. In the process I found and fixed a bug in tar so now it has one less.

cocotu 11-06-2007 11:05 AM

baf, the command worked fine. I placed it in a cronjob to run everyday at 3AM. It is 11:00AM and tar is still running. When I ran it that day it did not take 8 hours to complete. Do you think is something to do with cron? thanks


All times are GMT -5. The time now is 05:45 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.