LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-05-2010, 08:14 AM   #1
rn-pro
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Tar problem; Cannot stat: No such file or directory


Hi,

I'm trying to backup every night a big directory (~2.5Gb) using tar+gzip.
I'm calling tar like this:

nice -n 19 tar --ignore-failed-read --exclude-tag-all=.kein-backup -Pczpsf '/backup/20100925233802f/archive.tar.gz' '/srv/products'

And in 90% of the cases works just fine, in about 20 minutes is everything done. However, if it happens that in those minutes one file or folder from '/srv/products' gets deleted it reports me the following error:

tar: /srv/products/prod14564.gif: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

Does it exist a parameter for tar to ignore this kind of errors? Is it there any other way to avoid these errors?

Thank you very much,
rn-pro
 
Old 10-05-2010, 11:50 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Did you search the ignore keyword on the man page for tar?
 
Old 10-07-2010, 02:03 AM   #3
rn-pro
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, I did, but unfortunatelly I couldn't see any solution there.
There I found this option:
--ignore-failed-read do not exit with nonzero on unreadable files

which only helps in the case when a file was changed in between.

Has somebody any other ideea?

Thanks
 
Old 10-07-2010, 03:53 AM   #4
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
But did archive.tar.gz create and can you extract it successfully?
 
  


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
/bin/cp cannot stat "filename" no such file name or directory fcfury Linux - Newbie 2 07-01-2009 10:21 AM
cannot stat ... "modules.order" ... No such file or directory shogun1234 Linux - Kernel 1 11-27-2008 03:12 PM
cannot stat /etc/X11/X (no such file or directory) theabyyss Linux - Software 2 02-12-2008 08:15 PM
error: stat of /var/log/ppp/connect-errors failed: No such file or directory Niceman2005 Linux - Newbie 0 01-20-2005 01:29 AM
lsattr: no such file or directory while trying to stat... acampbell Linux - General 6 12-01-2003 03:41 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:32 AM.

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