[Samba] backup script exit with error (probably because of tar warning)

Elyad Alaei elysamba4 at gmail.com
Wed Nov 12 03:53:36 MST 2014


Hi dear list members
It's some time that we have issue regarding backup script of samba 4.0.10.
It exits with error: "Error while archiving
/home/a/samba-backup/samba4_private.121114.tar.bz2"

After some troubleshooting, I noticed it is PROBABLY because of tar,
issuing this warning with the exit code of 1:
"tar: ./private: file changed as we read it"
It is related to this line in the backup script:

   tar cjf ${WHERE}/samba4_${n}.${WHEN}.tar.bz2 $relativedirname
--exclude=*.ldb >/      dev/null 2>&1
    if [ $? -ne 0 ]; then
       echo "Error while archiving MYpri
${WHERE}/samba4_${n}.${WHEN}.tar.bz2"
       exit 1
    fi

I'm afraid, changing the exit condition, inorder to exclude exit code with
1, would result in unsafe backups?
Any ideas?

Tanx
E. Alaei


More information about the samba mailing list