Hello:
I have an NSI installer I wrote a while back that, among other things, runs CLI commands to restore courses. Currently, my installer runs the php commands like so:
nsExec::Exec 'php ${Apache_HTDOCS_FOLDER}\lms\admin\cli\restore_backup.php --file "$INSTDIR\Module_Backups\${MODULE_A_FILE}" --categoryid=${MODULE_A_CATEGORY}'
Where:
$INSTDIR - is a temporary location where the files my installer uses are being stored during processing
${MODULE_A_FILE} - is the filepath of a course backup mbz I intend to restore into the site.
As you can see, I'm making use of the php CLI to restore courses programmatically, and until now, this has worked wonderfully. However, it has become necessary for our business to, instead of deliver complete replacements for old courses, deliver new courses that are separate from the old ones. So, for example, if the mbz is storing a course ID that already exists on the destination system, I don't want that course to get restored into the old one; I want it be restored into a new course every time, regardless of whether the IDs match or not.
I have been unable so far to find where in the API the settings are to choose this mode for restoration. I can do it easily enough in the Moodle site interface, but I need to create a solution that does not rely on the end user admins restoring the courses, because they don't want to do it; they want a simple installer to do it all for them. 
Does anyone know if the option to "restore into new course" exists for the CLI, and if so, where it's defined? I'd like to be able to set a category for it, not include enrolled users, and give it a new course name and course short name, if possible. Is such a thing even possible from the command line?