Fix broken export-data admin command and add test script checking the command to CI.