I figured it out. It was related to menus not being rebuilt.
The menus had to be rebuilt, but before that the row format on the civicrm_menu table had to be changed to dynamic. Somehow during the database copy from production to test, the test table row format was changed to dynamic so didn't have the issue.
ALTER TABLE civicrm_menu ROW_FORMAT=...
The files and directory need to be group writeable, and you need the which ever user that is running cron to be in that group. Check to see if cron is being run by root, that can create log files that are root only.
There is the CiviConfigure extension but I'm not sure how current it is.
There is also still bin/csv/export.php which you can use for option values and tags and such.
You can also use the api to retrieve and set various entities, e.g. using the cv tool.
For CiviCase, one of the original arguments for using external files was for versioning and managing ...
The sites/default/files/civicrm/ConfigAndLog/ directory should contain your CiviCRM debug log (and some other files), provided that you're using Drupal, that your Drupal multisite directory is "default", and that the webserver is able to write to that directory. If you're not seeing that, you could:
Check assumptions of what CRM_Core_Error::debug_var() will ...