Be prepared.
Practice makes perfect. Practice your disaster recovery skills when there is no actual disaster. Know what to do if you come into work one morning and you have frantic customers who are saying things like "my site is down", or "my data is gone". When the fire comes, be prepared to use the tools and processes to respond in a quick and professional manner.Key Steps to preparedness
- Be prepared - have daily backups ready to go
- Know how to use the daily backups
- Practice the restoration of courses, tables or entire DBs.
- Automate the backup of your moodle dbs
- Automate the backup of your moodle courses
Steps to restore a course
- Log into the moodle server using an account with admin privileges
- From the Site Admin menu, choose Restore
- Browse to the location of the .mbz
- Upload the file
- Click the Restore link
- Follow the steps to restore. Try restoring to an existing course, replacing the content
Steps to restore a table
- Open phpmyadmin or MySQL Workbench or MySQL Administrator
- Browse to your DB server
- Open the schema where the corrupt table exists
- Try to browse the corrupt table, verifies there is a problem
- Open the backupfilename.sql file using MySQL Workbench or MySQL Query Browser
- Search the file for the corrupt table name
- Copy the DROP, CREATE, INSERT code from the script into a new sql window or tab
- Ensure you are using the correct schema, type USE SCHEMA_NAME
- Execute your script to drop, rebuild and populate the table
Steps to restore a DB
- Open phpmyadmin or MySQL Workbench or MySQL Administrator
- Browse to your DB server
- Open the backupSchema_name.sql file using MySQL Workbench or MySQL Query Browser
- Ensure you are using the correct schema, type USE SCHEMA_NAME; //don't forget the ;
- Execute your backupfilename.sql script - dropping, rebuilding and re-populating your DB.
Also, you may attempt to use table and db repair tools/commands before trying to restore a backup, especially if your backups are a few days old and you want to minimize data lose.
In a separate post, I will blog about experimentation with table and DB repairing.
No comments:
Post a Comment