by Ken Task.
Follow up ...
The docs page here:
https://docs.moodle.org/310/en/Course_restore#Restore_via_CLI_for_administrators
does have an alternative suggestion ... at bottom of page above the 'See Also' section says this:
"Administrators can use MOOSH to bulk backup and restore courses from CLI"
and points to:
https://moosh-online.com/commands/#course-restore
I have and do use Moosh on several systems ... can testify it does work on systems prior to Moodle 3.10/3.11.
'SoS', Ken