Talk:Automated course backup: Difference between revisions
Helen Foster (talk | contribs) (→clarification of exclusion: reply) |
m (→clarification of exclusion: Tidy for 2.0) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
tar -czf <path_to_homedir>/moodle-db-`date +%Y%m%d`.tar.gz /var/backups/databases/moodle | tar -czf <path_to_homedir>/moodle-db-`date +%Y%m%d`.tar.gz /var/backups/databases/moodle | ||
== | ==Full path to the directory where you want to save the backup files== | ||
One of the settings is: | |||
Full path to the directory where you want to save the backup files | |||
(leave blank to save in its course default dir) | |||
I have my Moodle on a hosted server and tried various ways of designating a folder. It seems like the folder must be already created. I get a small red X on saving which I assume it means it won't work/wasn't found. It would be good to have some examples of what this could look like. |
Latest revision as of 13:07, 12 October 2011
SQL dump
I wonder if administrators should be recommended to use mysqlhotcopy rather than mysqldump
. Although mysqldump
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. mysqlhotcopy
locks 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
Full path to the directory where you want to save the backup files
One of the settings is: Full path to the directory where you want to save the backup files (leave blank to save in its course default dir) I have my Moodle on a hosted server and tried various ways of designating a folder. It seems like the folder must be already created. I get a small red X on saving which I assume it means it won't work/wasn't found. It would be good to have some examples of what this could look like.