Strangely large back up file - Moodle 2.2

Strangely large back up file - Moodle 2.2

by Sarah Champion -
Number of replies: 5

Hi all,

I am building a course on a local install of Moodle 2.2 (while waiting for a server to be set up) and have just attempted to do a back up of it so I can move it to the server. I found the back up to be massive, 900MB, and realised it was due to some videos in a repository I had set up being very large. I reduced the video size by about 75% and replaed them in the repository. I then ran the cron script to clean up old files, purged all the caches and ran the back up again. However I'm still getting a 900MB file!

There are no other large files used in the course.

What is happening here? And how do I fix it?

Average of ratings: -
In reply to Sarah Champion

Re: Strangely large back up file - Moodle 2.2

by Melinda Kraft -

Sarah,

The file repository is a place where Moodle can get files from.  When you place files from a file repository into a Moodle course, the files are copied into the course. Moodle is not just pointing towards the file in the repository (because the contents of a repository can change at any time and there are different ways to configure file repositories).

Because you didn't replace the videos in the course with the new smaller versions, the big files are still in the course. You will need to delete the big files from the course and re-add the new smaller ones.

On a related note, its important to realize that a file repository can take up significant space on your server, and Moodle backup processes won't back up the repository itself. Moodle backups are just backing up courses.  You would stil need an alternative backup method to back up repositories on the server and other site files (whatever you do for normal server backups).

Cheers!
Melinda

In reply to Melinda Kraft

Re: Strangely large back up file - Moodle 2.2

by Sarah Champion -

Thanks for your reply Melinda!

How do I go about actually deleting the larger files from the course? I know in moodle 1.9 I could just delete them from the files menu under administration but I can't find a similar area in Moodle 2.2. If I re-point the links to the large files to the smaller files and re-run the cron script, will this delete the larger files automatically?

Thanks for the info about the repository - I wasn't aware of this either!

Cheers,

Sarah

In reply to Sarah Champion

Re: Strangely large back up file - Moodle 2.2

by Ken Task -
Picture of Particularly helpful Moodlers

You might want to look at:

http://moodle.org/mod/forum/discuss.php?d=174270#p764079

while it is somewhat technical in nature, the bottom line seems to be:

files not linked anywhere in a course, are moved to trashdir

files are eventually deleted from the trashdir after 4 days

Both routines are controlled by cron jobs.  There is not, as of yet, any admin tool to remove files and no site admin settings to set number of days or other settings related to unlinking/deleting/archiving, etc.

Know of some busy K12 Moodle using educators who will have to change habit of uploading all files needed in a course then, at their leisure, linking to them when the 'time is right'.

'spirit of sharing', Ken

In reply to Sarah Champion

Re: Strangely large back up file - Moodle 2.2

by Melinda Kraft -

You have to edit the activity or resource, or delete it completely and re-create. If you edit it, you are going to link to the new smaller files and remove the link to the large ones.

As for the copying and pasting of files on the server that we all know and love from 1.9, that's no longer possible.  You have to do everything through the Moodle interface now.  There's lots of discussion about this in forums - just search on the File Picker.

Just because it sounds like you ran your 1.9 install much like we did, I will offer how we manage large files. We don't have FTP enabled on our servers, so I created a single "large file upload" file system repository that serves a silimar function to the "old" way of copying files to the server.  I share that folder with faculty who have big files, and they map a drive to it so they can move their own files in (though most of the time we end up doing it becasue we are ususally digitizing video for them for htis purpose).

There's a great help file in the Moodle docs for 2.2 that tells you how to set up a file system repository (there are different ways depending on your security needs and how you manage files).

In reply to Melinda Kraft

Re: Strangely large back up file - Moodle 2.2

by Sarah Champion -

Thanks Melinda! I've re-linked the smaller files and recreated the back up and it's 450MB smaller - much better!

Bit disappointing about the change in how the files work but oh well - worth it for everything else.

Thanks for the info on how you set up your  system repository. I will chat with our IT department about setting one up, as we also don't have FTP access and that sounds like the easiest way forward for us as well.