Talk:Automated course backup

Revision as of 19:36, 28 June 2007 by Helen Foster (talk | contribs) (Talk:Backup (administrator) moved to Talk:Backup settings)

Jump to: navigation, search

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
. Although
outputs a handy SQL file, it does not lock tables before being called, so there is the potential for data inconsistency on large/busy sites.
locks tables before making copies of the table files themselves. These can be tarred & gzipped for copy to another disk/server:
# 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