tar: Exiting with failure status due to previous errors

I got this error while restoring my backup of the rootfs:

I had done:

tar -jxvvf /home/droidzone/documents/rootfs.tar.bz2

Since I was using the verbose option -vv, I couldnt notice what the error mesage was.

I tried the ignore error option with:

tar -ignore-command-error -ignore-failed-read -jxvvf /home/droidzone/documents/rootfs.tar.bz2

But the error happened again.

Removing the verbose option showed the error:

[email protected]:/# tar -ignore-command-error -ignore-failed-read -jxf /home/droidzone/documents/rootfs.tar.bz2 
tar: dev/pts/2: Cannot mknod: Operation not permitted
tar: dev/pts/0: Cannot mknod: File exists
tar: dev/pts/1: Cannot mknod: File exists
tar: dev/pts/ptmx: Cannot mknod: File exists

So if you have block devices and try to restore to them, this error can happen. And it’s in most cases safe to ignore.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.