Moodle 3.5.3 & PHP 7.2 & Maria DB
I have found that the automatic backup files size has been doubling at certain dates with no KNOWN reason ( see attachs).
I have not made any changes during last days, only updating Moodle version
Courses have only quizzes, so students are not uploading content.
Any hint would be greatly appreciated
No hints. Only questions and suggestions. Cause it's strange.
Operating system is? Remotely hosted? Shared system or dedicated/VPS's?
Are the backups going to 'File Area' or to a designated directory? 'File Area' is the sea of files in moodledata/filedir and thus makes deeper investigation a little more complicated as finding the backups require an SQL query to find the contenthash - thus location of the backup file.
That report of automated backups is generated from tables in the DB so this could be related to some meta data mis-calculation ... thus the following ...
Suggestion: go to one of those courses and backup via Moodle Course menu. Step through the screens during the backup process to see what's automatically checked for backup. Is the backup file the same size as what you see in the autobackup report?
Further investigation requires some command line foo but think I'd compare the questions.xml file size from two backups (this is why easier if backups were sent to designated directory).
So let's say there is a backup file in a designated/test directory by this name:
You can extract from the mbz the questions.xml file and the moodle_backup.xml file from the backup without extracting all the contents with this command:
tar zxvf backup-moodle2-course-104-dso_intro-20181205-1612.mbz questions.xml moodle_backup.xml
Issuing the above command, will display:
ls -l *.xml
-rw-r--r-- 1 root root 25589 Dec 5 11:14 moodle_backup.xml
-rw-r--r-- 1 root root 5760253 Dec 5 11:14 questions.xml
xml files are ascii so you could open with a text editor to view ... moodle_backup.xml good candidate for that ... or search it for quiz hints:
fgrep 'quiz' moodle_backup.xml
suggest renaming questions.xml to match the course name ... dso_intro_questions.xml following this example).
Then do the same thing for another backup of the same course that's larger.
Are the questions.xml files increasing in size?
'spirit of sharing', Ken
Thanks a lot, Ken, for your reply.
Ubuntu 16 in a VPS M SSD (no setup)+ (CONTABO)
Yes I have checked that questions.xml files increasing in size, see attach
What could be the reason for that to happen?
I had noticed that recently I wasn't able to duplicate a question, it hanged Moodle. So I could imagine that it tried to duplicate all the question bank, could be it possible?
How could I delete all the duplicate questions?
Well, we've now managed to verify that what you saw in automated backups is accurate and that there is a quiz/questions issue. But ... I can't answer your next questions:
"What could be the reason for that to happen? " Have not a clue! Am not a programmer/coder.
"So I could imagine that it tried to duplicate all the question bank, could be it possible?" ... certainly possible!
And you've given a hint for you to pursue ...
"I had noticed that recently I wasn't able to duplicate a question, it hanged Moodle."
which you didn't share earlier. Sooooo ....
have a suggestion ... but before using it ... backup your DB (sql dump) ... even if it might be a little confused right now, best to have a backup of something rather than nothing ... reason follows:
There is a tool to check the health ... https://site/admin/tool/health/ ** see note below ...
use this in non-prime time for students and might consider putting site in maintenance mode before attempting above. It is DB intensive and could spike your CPU/processes. Considered 'experimental' but I have used it to clean up issues with quizzes before ... successfully. (but didn't have your specific problem)
It might take a long time to run but hopefully you will see something generated ... normally, it provides a 'solutions' link which normally shows a MySQL query to run from mysql> prompt.
** Moodle's Quiz Master ... Tim Hunt .. will hopefully see your posting and jump in here with much better questions/solutions, etc. So if you can wait, delay my suggestion.
'spirit of sharing', Ken