The backup log shows course as unfinished, (see unfinished.jpg file attached).
If I go to the course in question, I see the following details under course backups. (see negative file size.jpg). -457044577 bytes
if I try to download the negative size file, I get "500 server error - there is a problem with the resource you are looking for, and it cannot be displayed."
I am also not able to restore the course using the neg size back up file. If I try to download a file from another course that is (940MB) than the , it downloads no problem and can be restored.
Any suggestions as to what is causing this issue ? I have tried deleting the negative files and letting the back up run again. It says backup completed successfully. but file size still shows as negative. not sure what else to do. It seems to only be affecting the one course right now.
What does php -v show? 32 bit version of PHP? If so, operating system can't work with files over 2 gigs if I re-call correctly (happened on Windows - not on linux 64 bit servers).
What you are looking at in the Moodle UI is data coming from DB. In this case, the table mdl_files has file information (meta data) that includes file size.
Use the following MySQL query:
select contenthash,filename,filesize from `mdl_files` where (`filearea` like "backup" and `filename` like "%.mbz%")
The output of that will show something like - last column is size.
The first column is the content hash and shows the physical location of the file.
Use whatever you have to browse files to see the file size. No files by humanly recognizable names in vr. 2 or higher.
The neg number certainly not coming from operating system (I would hope) - it's meta data from DB.
That's an autobackup that probably failed.
So, you could delete that row in mdl_files as well as any file that might reside at the location you find in moodledata/filedir/xx/xx/contenthashname
For failed backups ... any files/folders remaining in moodledata/temp/backup/ can also be removed manually with no ill affects.
If you run automated backups, suggest saving them to a designated directory that you create. Makes it easier to find those backups by humanly recognizable names then.
Might be more stuff we need to look at or locate, but for now ....
'spirit of sharing', Ken
php -v shows the following:
PHP 5.4.24 (cli) (built: Jan 8 2014 20:26:10)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
yes the automated back up failed, but also fails if I run it manually.
I tried sql query as shown above but it did not show the backup in question with the negative file size. It showed 17 entries. The file names shows the course name - and the course with the negative file size is not shown.
I will take a look at backing up to a designated directory as well.
Turn off automatted backups until this is resolved. When turning it back on, think that version of Moodle allowed op to send backups to a designated directory of op making. Do that.
If that query didn't show the course in question, probably due to the 32 bit version of PHP. Backup failed so clean up the moodledata/temp/backup/ directories again.
Now to next response ...
'spirit of sharing', Ken
turned off automated backups and set backups to designated directory
Further update - we are running 32bit version of PHP. How would I find out what size the actual backup file size is for this course?
Also, I cleared out the moodeldata/temp/backup folder then tried running backup again and was able to get contenthash of 60d61bac42e78e0ed68d3efe001e7509. I checked 60/d6 and the folder is empty. Not sure if that helps or not.
I also noticed the backup job took approx 10 minutes. It also said it backed up successfully.
There is an addon which gives a report of approximate size of backups.
Get the version of the plugin for your version of Moodle 2.6.
That report is a 'ball park' report for size of the backup.
Also try to get https://moodle.org/plugins/view.php?id=522 - moosh running on your server. It also is command line and a powerful tool.
That has a command for 'course info' you could try to get a more accurate number for backup file size.
Am not a Windows person ... don't think there is a 64 bit version of PHP until 7.0.x and you can't run Moodle 2.6.x with PHP 7 anything ... moodle not compat. Moodle must be at least version 3.0.highest.
Now before you embark on upgrading Moodle, make sure you research that for your platform. Cannot hyperjump from 2.6 to 3.0.x.
If that course did backup successfully, you should then see it by running that query again.
And you should be able to find the file in moodledata/filedir/
You might have to backup that course in two parts ... one backup through one half of the sections. And another that gets the second half of the sections. Then, to restore it, one would have to restore the 2nd backup first, then restore to same course the first backup to get the course completely restored and in the order it was before (I think ... been many moons since I've had to do that to remember!)
'spirit of sharing', Ken
I installed the report course size add-on - and found the course (diff name than shown on the actual course site), showed a value of -435MB, if I hovered over the -436MB I see the total bytes for backup the same as shown in the course backup files area. (see screenshot coursesize.jpg)
I also installed moosh and ran course info, but no file size results - or am I to be adding in some additional to moosh -n course info? We are presently testing moodle 3.4 on another server, but not ready t0 move as of yet.
I tried another backup again but minus the users data and it the backup worked fine. But size was only 7.2MB. I have narrowed it down to the one forum in particular and if I leave the user data out for this forum, the backup works fine.
In the forum the students have uploaded video presentations - which is taking up a lot of space. not sure if its a space issue or a bad link for a video etc.
went through forum and found video files totaling 812 MB. But there are also links to youtube videos. Does this shed any light on the issue?
I believe I have found the issue, I also discovered additional video files amounting to a total of over the 3 GB limit. I have spoken with the instructor and have asked them to set a limit on the video uploads of 50MB max. And they will also inform the students to keep their videos under the 50MB limit. The videos are only supposed to be 5 minutes in length.
A big thank you Ken for pointing me in the right direction. You've been extremely helpful.