Tar: file changed as we read it
From FVue
Problem
When creating a tar file named incr.tgz, tar exits with the error message:
tar: Error exit delayed from previous errors
Moving up through the list of files, I see this error:
./incr.tgz: file changed as we read it
Environment
tar (GNU tar) 1.13.25
Solution
- As it was the tar file (incr.tgz)self – changing while being created – specify tar to exclude this specific file by using the `--exclude' option.
- Use the `--ignore-failed-read' option which prevents tar from exitting with non-zero status on unreadable files
See also
- MediaWiki backup via SSH sync
- Poor man's rsync: synchronize two directories using ssh and tar
Journal
20070816
- (Bug-tar) --ignore-failed-read not applied to files changing as tar reads them
- Tar user offering new tar option `--ignore-failed-read' to let tar exit with 0 after expected failed reads
Advertisement