public static function create_restore_temp_tables($restoreid)
 {
     global $CFG, $DB;
     $dbman = $DB->get_manager();
     // We are going to use database_manager services
     if ($dbman->table_exists('backup_ids_temp')) {
         // Table exists, from restore prechecks
         // TODO: Improve this by inserting/selecting some record to see there is restoreid match
         // TODO: If not match, exception, table corresponds to another backup/restore operation
         return true;
     }
     backup_controller_dbops::create_temptable_from_real_table($restoreid, 'backup_ids_template', 'backup_ids_temp');
     backup_controller_dbops::create_temptable_from_real_table($restoreid, 'backup_files_template', 'backup_files_temp');
     return false;
 }