Guess ... in reading debug output ...
Debug points to availability issues upon restore ... so in the template course you are using to replicate, does that course have any restrictions/availability settings unique and specific to that course? IF so, remove those ... ie, don't restrict. See if the backup runs cleanly. The restore should be good and then you'd have to go back into availability settings of that item to restrict or whatever.
'spirit of sharing', Ken
Backup and restore
Coding error during restore/import
This discussion has been locked so you can no longer reply to it.