mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
implemented db_exporter
This commit is contained in:
7
bin/README.md
Normal file
7
bin/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
All bash script here must be compatible with following environments:
|
||||
|
||||
- *linux*: bash 4.x
|
||||
|
||||
- *windows*: git for windows 2.9.3
|
||||
|
||||
- *osx*
|
||||
1
bin/db_exporter/.gitignore
vendored
Normal file
1
bin/db_exporter/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
config.sh
|
||||
45
bin/db_exporter/db_export.sh
Executable file
45
bin/db_exporter/db_export.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
ROOTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )"
|
||||
|
||||
source $ROOTPATH"/bin/bash_shared/includes.sh"
|
||||
|
||||
if [ -f "./config.sh" ]; then
|
||||
source "./config.sh" # should overwrite previous
|
||||
fi
|
||||
|
||||
echo "===== STARTING PROCESS ====="
|
||||
|
||||
|
||||
function export() {
|
||||
echo "Working on: "$1
|
||||
database=$1
|
||||
|
||||
var_base_path="DB_"$database"_PATHS"
|
||||
base_path=${!var_base_path}
|
||||
|
||||
base_conf="TPATH="$base_path";\
|
||||
CLEANFOLDER=1; \
|
||||
CHMODE=0; \
|
||||
TEXTDUMPS=0; \
|
||||
PARSEDUMP=1; \
|
||||
FULL=0; \
|
||||
DUMPOPTS='--skip-comments --skip-set-charset --routines --extended-insert --order-by-primary --single-transaction --quick'; \
|
||||
"
|
||||
|
||||
var_base_conf="DB_"$database"_CONF"
|
||||
base_conf=$base_conf${!var_base_conf}
|
||||
|
||||
var_base_name="DB_"$database"_NAME"
|
||||
base_name=${!var_base_name}
|
||||
|
||||
|
||||
bash $AC_PATH_MODULES"/uwd/mysql-tools/mysql-tools" dump "" $base_name "" "$base_conf"
|
||||
}
|
||||
|
||||
for db in ${DATABASES[@]}
|
||||
do
|
||||
export "$db"
|
||||
done
|
||||
|
||||
echo "===== DONE ====="
|
||||
@@ -100,14 +100,35 @@ DB_CHARACTERS_PATHS=(
|
||||
$SRCPATH"/data/sql/base/characters"
|
||||
)
|
||||
|
||||
DB_CHARACTERS_NAME="characters"
|
||||
|
||||
DB_CHARACTERS_CONF="MYSQL_USER='root'; \
|
||||
MYSQL_PASS='root'; \
|
||||
MYSQL_HOST='localhost';\
|
||||
"
|
||||
|
||||
DB_AUTH_PATHS=(
|
||||
$SRCPATH"/data/sql/base/auth/"
|
||||
)
|
||||
|
||||
DB_AUTH_NAME="auth"
|
||||
|
||||
DB_AUTH_CONF="MYSQL_USER='root'; \
|
||||
MYSQL_PASS='root'; \
|
||||
MYSQL_HOST='localhost';\
|
||||
"
|
||||
|
||||
DB_WORLD_PATHS=(
|
||||
$SRCPATH"/data/sql/base/world/"
|
||||
)
|
||||
|
||||
DB_WORLD_NAME="world"
|
||||
|
||||
DB_WORLD_CONF="MYSQL_USER='root'; \
|
||||
MYSQL_PASS='root'; \
|
||||
MYSQL_HOST='localhost';\
|
||||
"
|
||||
|
||||
# UPDATES
|
||||
DB_CHARACTERS_UPDATE_PATHS=(
|
||||
$SRCPATH"/data/sql/updates/characters/"
|
||||
|
||||
Reference in New Issue
Block a user