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:
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.
- $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.
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