Quantcast
Channel: Installing and upgrading help
Viewing all articles
Browse latest Browse all 46757

Re: How to backup Moodle in a revision-control friendly way

$
0
0
by Antonello Lobianco.  

This script should to the trick (mysqldump options from here):

#!/bin/sh

mysqldump  [DB_NAME] -u [DB_USER] --password=[DB_PASSWORD] --no-autocommit --single-transaction --opt -Q -C --skip-extended-insert --order-by-primary --create-options --ignore-table=[DB_NAME].mdl_cache_filters --ignore-table=[DB_NAME].mdl_cache_flags > [DB_NAME].sql

mysqldump  [DB_NAME] -u [DB_USER] mdl_cache_filters mdl_cache_flags --password=[DB_PASSWORD] --no-autocommit --single-transaction --opt -Q -C --skip-extended-insert --order-by-primary --create-options --no-data  >> [DB_NAME].sql

echo "Backup created!";

However I would like a confirmation that the tables  mdl_cache_filters and mdl_cache_flags (and possibly others) can be truncated safelly, as I just assume it from their names but I can't get any doc over this issue.

Thank you smile





Viewing all articles
Browse latest Browse all 46757

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>