Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Re: error cannot_precheck_wrong_status when trying to restore a course via admin/cli/restore_backup.php

$
0
0
by Miguel _.  

Hi, in case it helps anyone else, the problem in my case was that I have the moodle temp directory configured outside of $CFG->dataroot, via $CFG->tempdir. So, there were two temp directories being used by moodle:
  • $CFG->tempdir/backup: here it generates a restore_xxx directory with the uncompressed contents of the backup file.
  • $CFG->dataroot/temp/backup: here it generates an empty restore_xxx temp directory.
In dataroot/temp/bacukp is where it scans for moodle_backup.xml, not finding it, the restore process breaks and ends with wrong_status error.

I could stop using $CFG->tempdir and keep everything in dataroot/temp, but I want to separate the moodle temps out of the main data directory (I work with a single node anyway). What I've done is to change the dataroot/temp directory to a symbolic link to $CFT->tempdir, so that it unzips and looks for the files in the same place. This way the backup is restored without any problem. I think the problem came from cleaning up the files when restoring the environment, I must have deleted these links without realising and then not restored them.

Regards

Viewing all articles
Browse latest Browse all 6815

Trending Articles