Course duplication & memory storage: Import vs Backup/Restore

Course duplication & memory storage: Import vs Backup/Restore

by Phineas Head -
Number of replies: 4

Moodle Version: 2.8.3

Each year, we duplicate last year's courses, minus student data, to act as the skeleton for the new year's course. Our courses are large (often 1-2GB) due to lots of audio/visual resources, so I am keen to be as storage-efficient as possible.

Hithertofore we have just performed a Backup, then 'Restore as New Course': this duplicates all the teaching materials and most importantly the complex Gradebook and Assignment layout we use.


Is this the most storage-efficient solution? 

That is, for a given resource X on the old course, once this is Backed up and then Restored into a new course, does Moodle check the Restored course for already existing identical resources in its database and then point Xold and Xnew at the same resource? Or does it just create a (real) copy of X, doubling our storage requirements? Put differently, are we talking the equivalent of 'hard/deep copies' or 'symlinks'?


Alternatively, were I to create a (blank) new course from scratch, and then Import the resources into it, one by one, would this be more storage efficient? 

Importantly, would the Gradebook architecture be retained (i.e. when an Assignment activity is Imported, does it also bring with it its Gradebook Categories and settings?).

Average of ratings: -
In reply to Phineas Head

Re: Course duplication & memory storage: Import vs Backup/Restore

by Jamie Kramer -

Hi Phineas. In my experience I believe this is the most storage-efficient solution. For file resources such as your audio/visual files, the backup that is created would certainly include those files, so the backup file itself my have duplicated data. However, when you restore that backup as a new course, any file type resources are not re-created in duplication in the Moodle file system. Moodle recognizes that the same files are already stored in its internal file storage and just references existing files rather than duplicating them.

To answer your question directly That is, for a given resource X on the old course, once this is Backed up and then Restored into a new course, does Moodle check the Restored course for already existing identical resources in its database and then point Xold and Xnew at the same resource?

The answer is "yes" Moodle checks for already existing identical resources, but only for file type resources (audio/visual files that are stored on the file system and not in the db).

For other things that are stored in the database, those are duplicated. However, its just database records so not a concern the same way as large multi-media files.

With that said, your course backup files would still contain the duplicated audio/visual data, so you may want to look in to a retention policy to download/archive those and get rid of them from the Moodle site at some point in time.

Jamie

Average of ratings: Useful (1)
In reply to Jamie Kramer

Re: Course duplication & memory storage: Import vs Backup/Restore

by muhammad hassan -

Hi Jamie Kramer,

We are facing same issue, we want to upload student's data from the same course of one moodle installation to another moodle installation. But generally a course backup file include the course contents, student data and all items related to a course.

                                $controller = new restore_controller($folder, $course_id, backup::INTERACTIVE_NO, backup::MODE_GENERAL, $userdoingrestore, backup::TARGET_NEW_COURSE);


How we can backup a course without its contents and should only includes student related data.


Regards,



In reply to muhammad hassan

Re: Course duplication & memory storage: Import vs Backup/Restore

by Jamie Kramer -

Hi Muhammad. When you perform a course backup, there is a page where you can pick and choose which course activities and data you want to include in the backup. I don't think that there is an option though, to not backup the the course files related to the course. Perhaps there is but I don't know about it, and I need to defer that to someone who knows better.

I have had use cases where it would make sense to have an option to backup an entire course, including all completion data, gradebook, essentially all the db stuff, but to exclude the related course/activity files (the files that are stored in the Moodle data directory). If it is currently possible then I am not aware of it.

Sorry I'm not of more help on this.

Jamie

In reply to Jamie Kramer

Re: Course duplication & memory storage: Import vs Backup/Restore

by Phineas Head -

Hi Jamie, 

Very many thanks for your rapid and lucid reply! 

And yes, point taken also about deleting the temp backups out of user/public areas once restored.

Cheers, Phin