delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/19/11:08:01

X-Spam-Check-By: sourceware.org
Date: Mon, 19 Jun 2006 11:07:45 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Kyle Johnson <kjohnson AT fixertec DOT net>
cc: cygwin AT cygwin DOT com
Subject: Re: tar error
In-Reply-To: <4496AE25.2010903@fixertec.net>
Message-ID: <Pine.GSO.4.63.0606191057340.11100@access1.cims.nyu.edu>
References: <4496AE25 DOT 2010903 AT fixertec DOT net>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mon, 19 Jun 2006, Kyle Johnson wrote:

> Hi everyone.
> I'm trying to use tar to setup a cron backup job on one of my systems,
> but I'm getting the following errors:
>
> 1 $ tar -czPf /cygdrive/d/Backups/`date +%m%d%Y`.tgz /cygdrive/c/Shares/dist/*.DBF
> 2     147 [main] tar 2344 C:\cygwin\bin\tar.exe: *** fatal error - fork: can't reserve memory for stack 0x23EBE0 - 0x240000, Win32 error 487
> 3       7 [main] tar 1372 child_copy: stack write copy failed, 0x23EBE0..0x240000, done 0, windows pid 2353940, Win32 error 5
> 4 tar: child process: Cannot fork
> 5 tar: Error is not recoverable: exiting now
>
> The folder /cygdrive/c/Shares/dist/ has ~1,500 DBF files.  I have run a
> similar command on other folders, and did not run into any problems.
> Any ideas?

You are most likely running into command line limits.  I believe this was
fixed in the latest snapshots, so try installing a Cygwin snapshot as
described in <http://cygwin.com/faq/faq.setup.html#faq.setup.snapshots>
and report back to the list whether this fixes the problem for you.

Alternatively, you can do this much more efficiently by piping the list of
arguments to tar from, say, find, rather than relying on the shell
expansion, like this:

find /cygdrive/c/Shares/dist -mindepth 1 -maxdepth 1 -name '*.DBF' -print0 | tar -czPf /cygdrive/d/Backups/`date +%m%d%Y`.tgz --null -T -

This also has the advantage of handling filenames with spaces in them.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019