I have a script that backs up my server files;
Constantly flea error due to trying to compress a file that is being written:
tar: /var/prod/out.log: file changed as we read it
tar: /var/prod/WLS_DIAGNOSTIC.DAT: file changed as we read it
This is my original command:
${cmdtar} -cpvf bkp_$date.tar ${org} >> /tmp/bkp.log
I have included the "--ignore-failed-read" option in my tar command:
${cmdtar} -cpvf bkp_$date.tar ${org} --ignore-failed-read >> /tmp/bkp.log
Even with this option added in the command the backup returns me "file changed as we read it"
Can anybody help me? How do I avoid this return being considered a mistake?
[user@host]$ tar --help | grep ignore-failed-read
--ignore-failed-read do not exit with nonzero on unreadable files