in reply to exit value in tar command

The correct tar command:

(tar cvf - * | cd /var/tmp/dump; tar xvf - ); output=\$\?; if \$output -eq 0; then touch /var/tmp/dump/success.ok; fi;);