Backup and Restore without Images

Backup and Restore without Images

by Max Ross -
Number of replies: 7

Running locally on my laptop I have moodle 2.03. In this I have started creating a course. I have included pages with images that I add by uploading.

When I then backup this course I get a very small mbz file.

When I restore this course onto a hosted machine running moodle 2.0.3 the course restores, but none of the images show up.

When I go to an image I get the error message

No input file specified.

and the URL is

It looks like the database information for the files/images is backedup and restored, but the images themselves are not being included in the backup and thus not restored. Now the database is out of sync with where the files actually are.

I have searched around and get lots of information about the new file management and storage. But nothing that helps me with this.

Thanks in advance Max.

Average of ratings: -
In reply to Max Ross

Re: Backup and Restore without Images

by Swisstac Bravin -

As admin user.,,, copy the entire content of data folder into server/mysql/replace the data folder. change the key value in server/moodle/config.php

$CFG->passwordsaltmain = '?_J8Ok:SVf98xrw5=lhj4Tlg6d9R'; with ur laptop generated value.. by doing this you no need to backup anything else... everything as you seen on laptop will there be in server....

dont forget to place the image in the appropriate position as in the laptop or else it wont come..,

I think all the file u have uploaded is in moodledata folder....

check it....if any doubts post it..............

all the best......


In reply to Swisstac Bravin

Re: Backup and Restore without Images

by Max Ross -

This may work, but I will then loose all the moodledata that I have already on my hosted site. In future I also want to backup my courses and share them with other teachers. Have I included the images incorrectly somehow by not understanding the new filepicker?

In reply to Max Ross

Re: Backup and Restore without Images

by Max Ross -

Have done more investigation. The backup process is not including the images. The folder structure is restored but without images in it.

The images were added to the course using upload to server. They display fine on the original course.

I don't know how to look at the mbz file to see if they are actually in this file, but the size is too small.

Can anyone help? Cheers Max.

In reply to Max Ross

Re: Backup and Restore without Images

by Swisstac Bravin -

Hi Max.,

I had backed up 8 gb of data with video and images by doing so..,

k if you dont want to loose the data in hosted site make a backup of it. by coping the moodledata folder , data folder in mysql and config file its enough and replace with the one your trying it will work sure......

In reply to Max Ross

Re: Backup and Restore without Images

by Swisstac Bravin -

Another thing is every time installing a moodle will give you different hash value which is stored in config.php file of moodle..

so if your restoring the data from another installed moodle try replacing the config

$CFG->passwordsaltmain = '?_J8Ok:SVf98xrw5=lhj4Tlg6d9R';

information., but this will affect your existing one ..,

In reply to Swisstac Bravin

Re: Backup and Restore without Images

by Max Ross -

Turns out it did work and the images were there. What I had to do was turn off a setting. 

Images don't work until you turn off a setting. Administration > Server > HTTP > Use slash arguments >> “uncheck” (set to NO).

Average of ratings: Useful (1)
In reply to Max Ross

Re: Backup and Restore without Images

by John Doubleday -

Hi Max,

Thanks for showing us the HTTP setting page. I think this could be a common area to solve  differences across Moodles.