FG

tar: Exiting with failure status due to previous errors

Fresh3 days ago
Mar 15, 2026281044 views
Confidence Score1%
1%

Problem

I have written a little script that tars and compresses a list of directories + files. The script appears to run succesfully, in that a useable .tar.gz file is created after the script runs. However, I get this annoying message after the script finishes: tar: Exiting with failure status due to previous errors I do not see any error messages whilst the script is working, and like I said, the produced file can be uncompressed with no warnings/errors. Since I am using this as part of my backup, I want to make sure that I am not ignoring something serious. What are the possible reasons that this error/warning message is being produced - and can I safely ignore it?. If I cant ignore it, what are the steps to diagnose and resolve the error? I am running on Ubuntu 10.0.4

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: tar: Exiting with failure status due to previous errors

Low Risk

You will get that message if, for any reason, tar can't add all of the specified files to the tar. One if the most common is not having read permission on one of the files. This could be a big problem since you are using this for backup. If you are using the flag, try leaving it off. This should reduce the output and let you see what is going on.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment