Site icon New Generation Enterprise Linux

Stop stressing over tar failing halfway through your backups

Backup & Recovery (Rsync/Tar/Dd)

Stop stressing over tar failing halfway through your backups

đź§© The Challenge

You know that sinking feeling when a massive tar job hits a file that’s changing or unreadable and the whole archive just dies? I’ve wasted hours cleaning up half-baked backups because a single log rotation killed the stream.

đź’ˇ The Fix

Throw the ignore-failed-read flag into your command to tell tar to keep grinding through the rest of your data instead of panicking. It’ll finish the job and give you a warning at the end rather than a total failure.

tar --ignore-failed-read -cvf archive_name.tar /target/directory

⚙️ Why It Works

Setting this flag switches the exit status behavior so that disappearing files or permission hiccups don’t force a hard abort. It’s perfect for live filesystems where you can’t guarantee total silence while backing up.

🚀 Pro-Tip: Always pipe your tar output to a log file so you can grep for the specific files that failed after the process finishes.

Linux Tips & Tricks | © ngelinux.com | 9/18/2026

0 0 votes
Article Rating
Exit mobile version