LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-28-2014, 10:07 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 443

Rep: Reputation: Disabled
tar: Error exit delayed from previous errors - how to ignore?


Hello, i have bash script which archiving certain config files (tar czf ....)

and some output

Quote:
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: /usr/local/*.conf: Cannot stat: No such file or directory
tar: /nodewatch/scripts/nodewatch_config.php: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
I want to ask how to prevent tar "exiting" or does it mean there is no interuption, only it listed files which was unable to archive? The tar is not interupted?
 
Old 02-28-2014, 03:53 PM   #2
rabbit2345
Member
 
Registered: Apr 2007
Location: 中国上海
Distribution: openSUSE 11.3
Posts: 371

Rep: Reputation: 40
Hi,


tar was interrupted and didn't finish properly due to some missing files. It appears that everything except those files were archived, but it's hard to say. You need to post the relevant parts of your script here, as it's fairly difficult to know what's happening without seeing the commands you're running from the script.


-rabbit
 
Old 02-28-2014, 05:36 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,714

Rep: Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280
The usual cause for "tar: /usr/local/*.conf: Cannot stat: No such file or directory" type of error is that the file/directory has been deleted... but tar had already started processing the directory the files were in, so the list of files to backup was in memory... and the files were actually deleted.

This can also happen with temporary work files that disappear while backups are being made.

the "Error exit delayed from previous errors" is because the "file not found" is not a fatal error, so the exit was delayed (mostly just that an error has happened).

I always see these if I make a backup of an active filesystem... Sometimes it is a "file changed while reading"... Which just means that the specific file might be corrupted (the error is caused by a modification date after tar has started working on it - but depending on the type of file it could still be valid).

Last edited by jpollard; 02-28-2014 at 05:37 PM.
 
Old 03-01-2014, 03:24 AM   #4
postcd
Member
 
Registered: Oct 2013
Posts: 443

Original Poster
Rep: Reputation: Disabled
Question

Thanks, my command is like:
Code:
tar czf archive.tar.gz filepath folderpath filepath filepath
thats all, no parameters..

so if some of files/pathes fails, does it mean that rest dont backup? Any way to force tar to just skip non existing no matter how many will be and continue next?
 
Old 03-01-2014, 06:35 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,714

Rep: Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280
It does complete. All files are copied as best it can. The error is just that a file has been changed/deleted in the process. The only thing that causes an abort is a read/write failure.

The others are just notices that certain files either didn't get backed up, or may have problems.
 
1 members found this post helpful.
  


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 07:43 PM
tar:Error exit delayed from previous errors csegau Linux - Newbie 2 12-06-2010 11:26 AM
tar: Error exit delayed from previous errors flyscan Linux - Software 3 05-18-2007 12:22 AM
tar: Error exit delayed from previous errors madenan Linux - Software 0 08-06-2003 03:38 PM
tar: Error exit delayed from previous errors x2000koh Programming 3 05-09-2003 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:55 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration