X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=database_utils%2Fdump_db.sh;h=89c83f02fedca7aea893155972deab76c17b12c7;hb=fb5855ccaaffd7f9b5398505be9eed9b5b8e11d9;hp=3c94d318eee0932eb7efa891d69b6ce29d0d4dc7;hpb=c78233e1750d5d231e99ffedb5ba81014f84e6fe;p=osm%2FRO.git diff --git a/database_utils/dump_db.sh b/database_utils/dump_db.sh index 3c94d318..89c83f02 100755 --- a/database_utils/dump_db.sh +++ b/database_utils/dump_db.sh @@ -1,7 +1,7 @@ #!/bin/bash ## -# Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. +# Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U. # This file is part of openmano # All Rights Reserved. # @@ -23,7 +23,7 @@ LICENSE_HEAD='/** -* Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. +* Copyright 2017 Telefonica Investigacion y Desarrollo, S.A.U. * This file is part of openmano * All Rights Reserved. * @@ -54,7 +54,7 @@ DBNAME="mano_db" MYSQL=$(which mysql) AWK=$(which awk) GREP=$(which grep) -DIRNAME=`dirname $0` +DIRNAME=`dirname $(readlink -f $0)` function usage(){ echo -e "Usage: $0 OPTIONS" @@ -127,6 +127,7 @@ do echo done + #echo structure, including the content of schema_version echo "$LICENSE_HEAD" > ${DIRNAME}/${DBNAME}_structure.sql mysqldump $DBHOST_ $DBPORT_ $DBUSER_ $DBPASS_ --no-data --add-drop-table --add-drop-database --routines --databases $DBNAME >> ${DIRNAME}/${DBNAME}_structure.sql