Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • But what happens if there are really some errors during the read operation in the data or config folders? I would like to ignore not-found errors but not actual I/O errors. Commented May 13, 2018 at 9:23
  • Check my updated answer Commented May 13, 2018 at 12:24
  • Thanks, I tried with --ignore-failed-read but if there are some files inside config/ for example that the current user doesn't have permission to read this command returns 0: # tar cz --ignore-failed-read data config myfile | /bin/dd of=backup.tar tar: config/config.txt: Warning: Cannot open: Permission denied 0+1 records in 0+1 records out # echo ${PIPESTATUS[0]} 0 and this is wrong for me! The process substitution is a bit too much complex too, so I think I'll stick with Hauke's solution. Commented May 14, 2018 at 18:37
  • I think that none of the previous solutions are good enough: check my last update Commented May 15, 2018 at 1:46