by Maite C.
I copy herewith the reply James gave in this site
The backdrop here is the need to move a .mbz file from one server to another.
When I browse to the course that I have backed up, and click restore, i see the backupfile area for that course. Right clicking the download link brings up a save as dialog that allows me to *copy the .mbz file to another server.
This works great EXCEPT WHEN THE .mbz file that is bigger than 100 MB. If the file is larger than 100 MB (and believe me, I have made all the adjustments to the php.ini file) the browser crashes and does not allow me to move or copy the backup file. I am dead in the water. And since moodle 2.x hides files so well, its very difficult to find the actual .mbz file in the file system so you can copy it using the OS.
Today, I found this amazing post that detailed how to FIND THE .MBZ file in your filesystem.
The highlights are this:
Mine was in two folders down like moodledata\filedir\xx\xx.
8. Once you find it, you can copy it.
I copied mine to the server where I would be restoring and renamed it
9. Now you are ready to restore the file!
Wow, it restored the first time 100% correctly.
Use the forums, sometimes people are golden!
When I browse to the course that I have backed up, and click restore, i see the backupfile area for that course. Right clicking the download link brings up a save as dialog that allows me to *copy the .mbz file to another server.
This works great EXCEPT WHEN THE .mbz file that is bigger than 100 MB. If the file is larger than 100 MB (and believe me, I have made all the adjustments to the php.ini file) the browser crashes and does not allow me to move or copy the backup file. I am dead in the water. And since moodle 2.x hides files so well, its very difficult to find the actual .mbz file in the file system so you can copy it using the OS.
Today, I found this amazing post that detailed how to FIND THE .MBZ file in your filesystem.
The highlights are this:
- Open the db and browse to the mdl_files table
- Find the name of the backup file in the mdl_files table in your DB. Look in thefilename field
- I filtered by filearea = 'backup' - reduced my file list from 70000 to 150.
- Find and copy the hashed name in the contenthash field.
- Browse to the server where your datafiles are stored (if not sure, look in the config.php file) - they will not be inside the webroot of the site. I keep mine on a different drive, the F drive.
- Look for the moodledata\filedir (this is the secret location)
- Now search for the contenthash field value - that big long string.... there is a file hiding somewhere in the moodledata\filedir filesystem. FIND IT.
Mine was in two folders down like moodledata\filedir\xx\xx.
8. Once you find it, you can copy it.
I copied mine to the server where I would be restoring and renamed it
9. Now you are ready to restore the file!
Wow, it restored the first time 100% correctly.
Moral of the story?
You can find and copy and rename and restore a *hidden backupfile with a little perseverance.Use the forums, sometimes people are golden!