The selected file is not a valid Moodle backup file and can't be restored.

Re: The selected file is not a valid Moodle backup file and can't be restored.

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

+1 to Emma's questions/response:

Unzip a copy of the backup from the 1.9 into a test folder.   Moodle backup in 1.9 must find a 'moodle.xml' file at the top level of the backup when un-zipped.   In the past, if Moodle didn't find a 'moodle.xml' NOR a 'moodle_backup.xml' (for version 2 backups), Moodle would complain with the error you saw.

So error might be true.

If the 1.9 site is still up and running, make sure there are no backups (backupdata folder in the course ID folder, see, if someone unzipped a backup one level up from backupdata into the root of the course ID folder - if they did, could be a moodle.xml contained therein as well) in the backup.   Then make fresh no user, no roles, backup of the course and 'TIA' (try it again).

'spirit of sharing', Ken