Talk:Automated course backup
Revision as of 12:52, 21 June 2007 by Chris Fryer
Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Automated course backup.
I wonder if administrators should be recommended to use mysqlhotcopy rather than
mysqldumpoutputs a handy SQL file, it does not lock tables before being called, so there is the potential for data inconsistency on large/busy sites.
mysqlhotcopylocks tables before making copies of the table files themselves. These can be tarred & gzipped for copy to another disk/server:
#!/bin/sh # # clear moodle backup directory rm -R /var/backups/databases/moodle/* # # hotcopy moodle tables mysqlhotcopy --addtodest -u <username> -p <password> moodle /var/backups/databases # # tar & gzip them tar -czf <path_to_homedir>/moodle-db-`date +%Y%m%d`.tar.gz /var/backups/databases/moodle