X-Spam-Check-By: sourceware.org Date: Mon, 19 Jun 2006 11:07:45 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Kyle Johnson cc: cygwin AT cygwin DOT com Subject: Re: tar error In-Reply-To: <4496AE25.2010903@fixertec.net> Message-ID: References: <4496AE25 DOT 2010903 AT fixertec DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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/