Auto-Backed-Up Courses not Accessible

Auto-Backed-Up Courses not Accessible

by Yaniv Cogan -
Number of replies: 5

Hi,

I'm using Moodle 2.9 - and for the first time I ran an automated course backup.

According to the Backups Report all back up attempts were successfully completed (status: OK). 
When configuring the auto backup settings I've left the "Automated backup storage" field empty (Default: Course backup filearea). 
When I navigate to one of the courses which were supposedly updated, and then in the Course Administraion block click on "restore" (/backup/restorefile.php), the Course backup area file list is empty, contrary to what I would have expected.

Could this possibly be either a bug, or a misunderstanding on my part (rather than a structuring problem in the Moodle files on our server that will require the involvement of someone more savvy on the matter)?

Thanks for taking the time to read (And hopefully answer...)

Average of ratings: -
In reply to Yaniv Cogan

Re: Auto-Backed-Up Courses not Accessible

by Ken Task -
Picture of Particularly helpful Moodlers

So the report on autobackups show all completed OK ... no errors AND you've elected to save the backups to the default area ... which is in moodledata/filedir/ - somewhere.

When going to a course that was backed up, one is expecting to see the autobackups listed when clicking restore and they are not there.

That right so far?

Do you have access to anything that will allow you to query your DB outside of Moodle?   (something like PHPMyAdmin or other MySQL (assuming you are running MySQL ... that info not shared).

If you do, let's see if the database knows of those backup files existence with the following query:

select contenthash,filename,filesize from `mdl_files` where (`filearea` like "backup" and `filename` like "%.mbz%")

That should show, in filename column, names *like* this:

backup-moodle2-course-261-soc-20131220-1236.mbz

The contenthash column actually tells you where the file is located.   Let's say the above backup file had the following for the contenthash:

c3e4ba471441b6cd9572caa1f774f52f99eca66c

The file should be in:

moodledata/filedir/c3/e4/

NOTE: the c3 directory and contained therein an e4 directory.

and it's name is:

c3e4ba471441b6cd9572caa1f774f52f99eca66c

Are the files there?

Check apache error logs for any clues if they are not.

'spirit of sharing', Ken

In reply to Ken Task

Re: Auto-Backed-Up Courses not Accessible

by Yaniv Cogan -

Thanks,
your understanding of the problem is accurate, and yes, I'm using MySQL, sorry for not mentioning that before.

I'll run the query, and get post back when I have the results.


In reply to Ken Task

Re: Auto-Backed-Up Courses not Accessible

by Yaniv Cogan -
Okay,

I first ran the query as is using the configurable reports plugin, and the resulting table didn't contain any of the course back ups that were supposed to be generated by auto backups.

I removed the `filearea` like "backup" condition from the SQL, and changed the selected fields to *, and the files did show up. That is because apparently the files are stored in filearea "automated" instead of filearea "backup". Is this normal? Can I change that manually? And will doing that solve the access problem?

Thanks again,

     -Yaniv 

In reply to Yaniv Cogan

Re: Auto-Backed-Up Courses not Accessible

by Ken Task -
Picture of Particularly helpful Moodlers

Moodle version with build date? ... found in Notifications.

Makes a difference .... me thinks ... moved where one finds them?

In a 3.1.highest and a 3.0.highest automated backups does tag the fiiles as being in 'automated' backup area ... which is still /moodledata/filedir/ (by the contenthash path/name).

After logging on as admin level user, go to Site Admin -> Courses -> Restore a course. In File PIcker, Select Server Files. In file picker, you'll see directory icons which are categories of your site.   Click one of those and drill down ... eventually you'll see a 'Automated Backups' directory icon and inside the backup.

'spirit of sharing', Ken



In reply to Ken Task

Re: Auto-Backed-Up Courses not Accessible

by Yaniv Cogan -

I'm using Moodle 2.9, but nevertheless your process worked! 

Thanks, and have a great day

    -Yaniv