LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Tar problem; Cannot stat: No such file or directory (https://www.linuxquestions.org/questions/programming-9/tar-problem%3B-cannot-stat-no-such-file-or-directory-836300/)

rn-pro 10-05-2010 07:14 AM

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

quanta 10-05-2010 10:50 AM

Did you search the ignore keyword on the man page for tar?

rn-pro 10-07-2010 01:03 AM

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

quanta 10-07-2010 02:53 AM

But did archive.tar.gz create and can you extract it successfully?


All times are GMT -5. The time now is 03:41 PM.