LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-12-2007, 07:28 PM   #1
brettreyu
LQ Newbie
 
Registered: Aug 2007
Posts: 9

Rep: Reputation: 0
Red Hat 5 " tar: error exit delayed from previous errors"


I searched in the forums before posting but nothing that was specific to the problem I am experiencing.

I wrote a simple little bash script to create a tar ball of a directory and then copy that tarball to another directory. This is what my script looked like right before I received the error message

Quote:
#!/bin/bash

TODAY=$(date)

tar cjvf /tmp/twiki$TODAY.tar.bz /var/www/html/twiki/data

cp /tmp/twiki$TODAY.tar.bz /mnt/backups/twiki$TODAY.tar.bz

echo "all done"
Now it always returns "tar: error exit delayed from previous errors". Before when I wasn't using $TODAY or $(date) everything was fine. Even when I try and tar the folder manually I get the same error.

Any advise?
 
Old 09-12-2007, 07:33 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
The problem is with the date format. Tar won't like the spaces.
Try something like
Code:
 #!/bin/bash

TODAY=$(date "+%Y%m%d")

tar cjvf /tmp/twiki$TODAY.tar.bz /var/www/html/twiki/data

cp /tmp/twiki$TODAY.tar.bz /mnt/backups/twiki$TODAY.tar.bz

echo "all done"



Cheers,
Tink
 
Old 09-12-2007, 07:35 PM   #3
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,476

Rep: Reputation: 156Reputation: 156
"tar: error exit delayed from previous errors"

tar doesn't quit on the first error it hits. It tries to find as many errors as possible. When you get the error exit delayed message it means that it has found as many errors as it could and now gives up.

The error message pertinent to your problem should appear somewhere between the tar command and the error exit delayed message.

---------------
Steve Stites
 
Old 09-13-2007, 11:04 AM   #4
brettreyu
LQ Newbie
 
Registered: Aug 2007
Posts: 9

Original Poster
Rep: Reputation: 0
TODAY=$(date "+%Y%m%d") fixed the issue thanks! Also thanks for the tip about tar reporting errors.
 
Old 09-13-2007, 01:42 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally Posted by brettreyu View Post
TODAY=$(date "+%Y%m%d") fixed the issue thanks!
Cool. Glad it works now :}



Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tar: Error exit delayed from previous errors menator Linux - Newbie 13 12-19-2013 06:43 PM
tar: Error exit delayed from previous errors flyscan Linux - Software 3 05-17-2007 11:22 PM
tar error "Error exit delayed from previous errors" skdevnath Linux - General 1 03-05-2004 01:06 PM
tar: Error exit delayed from previous errors madenan Linux - Software 0 08-06-2003 02:38 PM
tar: Error exit delayed from previous errors x2000koh Programming 3 05-09-2003 04:38 AM


All times are GMT -5. The time now is 12:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration