It seem that this returns an error page with "Your request could not be processed because a required security token was not present in the request. You may need to re-submit the form or reload the page. "
SPACE=ZZ
curl --netrc -H "X-Atlassian-Token: nocheck" --data "syncronous=true&exportType=TYPE_XML&includeComments=true&contentOption=all" -o download-$SPACE.html $URL/spaces/doexportspace.action?key=$SPACE
As you can see the X-Atlassian-Token: nocheck" header is present, still Confluence is refusing to perform the action.