From: Enrico Tassi Date: Thu, 16 Jun 2005 09:25:50 +0000 (+0000) Subject: added utility to dump some tables of the db on mowgli X-Git-Tag: INDEXING_NO_PROOFS~136 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=5d9c0b5cdda67ac1672b2e0dd83af7fb67a14a34;p=helm.git added utility to dump some tables of the db on mowgli (useful to export metadata to laptops) --- diff --git a/helm/ocaml/metadata/dump_db/dump.sh b/helm/ocaml/metadata/dump_db/dump.sh new file mode 100755 index 000000000..e7b43666e --- /dev/null +++ b/helm/ocaml/metadata/dump_db/dump.sh @@ -0,0 +1,20 @@ +ALL_TABLES=`../table_creator/table_creator list all` + +if [ -z "$1" ]; then + echo "Dumps to stdout some tables of a given db on mowgli." + echo "If no tables are given the dump will contain:" + echo " $ALL_TABLES" + echo "" + echo "usage: dump.sh dbname [tables...]" + echo "" + exit 1 +fi +DB=$1 +shift +if [ -z "$1" ]; then + TABLES=$ALL_TABLES +else + TABLES=$@ +fi + +mysqldump -e --add-drop-table -u helm -h mowgli.cs.unibo.it $DB $TABLES