Clearing database

Re: Clearing database

by Rick Jerz -
Number of replies: 1
Picture of Particularly helpful Moodlers Picture of Testers
Solmaz, how big is "big?" And how are you doing backups?

Whatever you decide to do, make sure to create a backup of your Moodle before doing anything. The suggestions by Leon and C Behan are good. However, they might "modify" data that may prevent you from doing course analytics in the future, if this is important to you.

Many years ago, I had a problem with a database that grew to be so big (1GB) that my server company said I needed to upgrade to a VPS. I did that, and it solved my database-size problem. It also improved my Moodle's overall performance, including backups.

By the way, my "backup" method is to backup the database via the MySQL command line, like this:

mysqldump -uyour_database_user -pyour_password --opt -r$your_server_location/backup_moodle/NOW-moodledb.sql your_moodle_database_name

My backup of the database is currently 2.5GB for around 50 courses, around 2000 students. My moodledata backup is around 10GB. Yep, I run a relatively small Moodle.

I do have two backup Moodle's, one for Moodle 1.9 and one for Moodle 2.9, that are not mixed into my current Moodle.  I can access data from these older Moodles via my sandbox MAMP.  As you might guess, I will probably begin a new Moodle when Moodle 4.0 comes out, and then move my current Moodle3 to my MAMP.
Average of ratings: Useful (2)