Excessively large backup file

Excessively large backup file

by Jeff Parrett -
Number of replies: 6

I'm using Moodle 3.82.

For one of my courses I'm getting a backup size of 765Mb. The course does not have much more than 10Mb of files. It uses videos which are embedded from Vimeo.

I've tried turning off the Include Question Bank option and no difference. When I turn off the Include Files the backup drops to 74Kb.

How can I determine where these excessive size files may be coming from.

Average of ratings: -
In reply to Jeff Parrett

Re: Excessively large backup file

by Ken Task -
Picture of Particularly helpful Moodlers

Look in each teachers private files if there are multiple teachers ... backup files belong to teachers and when you backup with users you get all user files as well.

Assignments?   If students were required to upload a file for an assignment and backup includes users you get user files in the backup.

How large is a no user backup ... leaving all content ... just no users ... not even teacher.

Errr ... 765M isn't excessive to me ... try a digital media course (video/audio/powerpoints that dance/digital photography for 25 - 75 students) ... 130Gig was largest at one time.   Command only backups.

Cron job running as it should?   There are clean up task which deletes temp files.

'SoS', Ken

Average of ratings: Useful (2)
In reply to Ken Task

Re: Excessively large backup file

by Jeff Parrett -
This course is in a clean development environment, 1 teacher, no users.

The backup is set for NO user information.

The only thing that makes a difference is if I say NO files.

The trouble is the only large files are videos that are embedded from Vimeo...the are NOT included in Moodle, this is done by a piece of HTML code. The only files in the course are some Images and PDFs. When I add their size up it adds up to 12Mb. I have no idea where the rest of the data is coming from.
In reply to Jeff Parrett

Re: Excessively large backup file

by C Behan -
Are there legacy files?
In the course settings, allow legacy files if it's not already allowed.
Then in the course administration block check the 'Legacy Files' link. If there are files there, delete them, and then change the course settings again.
Average of ratings: Useful (1)
In reply to C Behan

Re: Excessively large backup file

by Jeff Parrett -
Thanks for this information. It's not legacy files. This site is new and Legacy Files was never enabled.

When we first started developing we were adding the files to the course, uploading them to Moodle. This quickly became untenable as the files were too large. We then switched to embedding them from Vimeo using a snippet of HTML.

Does Moodle include embedded content in the backup?

Does Moodle keep a course development history so those original attached files are still associated?
In reply to Jeff Parrett

Re: Excessively large backup file

by Ken Task -
Picture of Particularly helpful Moodlers

No history ... but here is something to do to investigate:

Download the backup ... in a work directory.

tar zxvf [nameofbackup].mbz files files.xml
Will extract just files directory and the map to files in there via files.xml

Open the files.xml with text editor.
Search for your video files.
There will be a hash location consist of letters/numbers for a video.
Looks like:
  <file id="1730">
    <contenthash>276f7718d18a9b776757c052f2dd85b9b55ccfbf</contenthash>

That hash is the location of the file in the file directory.
Using example above:
files/27/6f/276f7718d18a9b776757c052f2dd85b9b55ccfbf

You'll also see in files.xml the filename.
Looks like:

<filename>Moodlemorphosis.mp4</filename>

So you could copy the file out to some other location to get a real look at it:

cp files/27/6f/276f7718d18a9b776757c052f2dd85b9b55ccfbf /someotherlocation/Moodlemorphosis.mp4

Check your servers DB
mdl_files table search for the file name

select filename,filesize from mdl_files where filename='Moodlemorphosis.mp4'

'SoS', Ken

Average of ratings: Useful (2)
In reply to Ken Task

Re: Excessively large backup file

by Jeff Parrett -
Found my issue...I ended up backing up each module until the file size blew up. Turns out the course creator had left some File Videos in an assignment. Once I replaced them the backup shrunk to manageable size.

Thanks everyone for your support
Average of ratings: Useful (1)