Restore is only as good as the backup.
We begin with ...
"first site is running on Moodle version 2.8 & the second one has Moodle version 3.9.1"
then later
"I am trying to restore on Moodle 3.11'
So we have upgraded the site from a 3.9.x to a dev 3.11 .... in hopes the
upgrade would fix, I imagine.
Same errors?
applying restore defaults
Unknown setting: questionbank
Several of these
insufficient capability to assign capability 'mod/quiz:deleteattempts' to role!
but various capabilities in different mods/addons
1 add-on:
local/mass_enroll:enrol
Am gonna guess that the 2.8.x site no longer up and running where you could go back to this course and see about roles and add-on plugins present in that course.
Is the local/mass_enroll shown above this one?
https://github.com/moodleuulm/moodle-local_bulkenrol
Capabilities
This plugin also introduces a new capability:
local/bulkenrol:enrolusers
By default, Moodle users are not allowed to use the functionality provided by this plugin. As administrator, you can selectively grant users the ability to use this functionality by adding the local/bulkenrol:enrolusers capability to an appropriate Moodle role.
How this plugin works
Teachers (rather users who have been granted the capability which is described in the "Capabilities" section above) will find an additional "User bulk enrolment" menu item within their course's course administration menu.
Attempting to 'merge' means users are already in simllar/same course so if there is a mis-match in the old 2.8.x backup and you don't have the 2.8.x site up somewhere to access and check/fix before making another backup, the only alternative is to inspect the contents of the backup.
Do that by un-compressing locally ... checking xml files and maybe editing them.
Then rebuild the backup to a tar.gz and try it again.
'SoS', Ken