Because you are using Bitnami, you have to issue php commands inside bitnami .... you show commands issued: php /bitnami/blah
That assumes that your system can find php-cli.
Your system should be able to find php-cli so check if it can with the command: which php
That should return the full path to php-cli.
Then use that path seen with: /path/to/php -v
backup_controllers table is a temp table used only when system is restoring a course. If there is any data in that table, you can truncate the table via command line. Since you are using postgres:
https://www.postgresql.org/docs/current/sql-truncate.html
If there is anything in moodledata/temp/backup/ like long foldernames ... list them to see the dates/time stamps on files/folders ... if they are not current manually remove any and all of them ... your error does hint at that.
Then there is adhoc_task - part of cron or any task moodle was supposed to preform that didn't finish, there are rows in mdl_adhoc_task that are jobs to be run again due to failure or some other reason. That table can also be truncated.
Unforunately from the GUI moodle has decided to put course reuses or restores in a background process ... there used to be a button on that screen to go onto other things ... no more button .. so if you are gonna go the GUI route again, just wait right there on that screen ... you will see progress and eventually it will show completed. Then navigate away. I realize that you are now up against crunch time but do wait if using GUI.
When in admin and you have navigated to the course category which is the destination of those course restores, scroll down to the bottom ... are you seeing those listed there as 'pending'?
And one last item ... if using the command line restore script here's the help on that:
php restore_backup.php
Restore backup into provided category or course.
If courseid is set, course module/s will be added into the course.
Options:
-f, --file=STRING Path to the backup file.
-c, --categoryid=INT ID of the course category to restore to.
-C, --courseid=INT ID of the course to restore to. This option is ignored if categoryid is set.
-s, --showdebugging Show developer level debugging information
-h, --help Print out this help.
Example:
$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/file.mbz --categoryid=1
Note it shows using full path to php-cli but in the example command it shows one is in moodle code (the admin/cli/ etc. The the file= parameter is once again full path to the .mbz file.
'SoS', Ken