mysqldump script

Re: mysqldump script

by Rick Jerz -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Testers
Sarath, it appears from your reply that you now have success running the mysqldump command manually.

In my own case, since I am the only person on my server, I build the password into the command. I then set up a cron job to run this command every evening (morning, at 2AM.) I don't know about that utf8 option... I don't use it. My Moodle is using utf8mb4_unicode_ci.

Can you get the DB credentials from the config file? Probably so. You can do almost anything in Linux, if you know how. And there are other techniques to supplying the password (search the Internet.) I am not an expert at this, just a professor who runs my own Moodle. Ken might come back with a little more insight. I don't use a Ubuntu server, but I think Ken knows more about this.

When you come up with an acceptable mysqldump file, create a second database, or better yet, a second Moodle, and then try importing your file into it. You need to test the full circle.

Also, the database is only one of two important backups. You need to also backup your moodledata folder if you ever need to fully recover your Moodle. And you should backup your config.php file (or Moodle app).
Average of ratings: Useful (1)