Update restore.sh

This commit is contained in:
mirocow 2016-02-16 15:07:53 +04:00
parent e331888171
commit fe692084e8
1 changed files with 1 additions and 5 deletions

View File

@ -113,11 +113,7 @@ restore()
time mysql --defaults-extra-file=$CONFIG_FILE $BDD --local-infile -e "SET foreign_key_checks = 0; SET unique_checks = 0; SET sql_log_bin = 0;
LOAD DATA LOCAL INFILE '$DIR/$BDD/$segment'
INTO TABLE $TABLE;
SET foreign_key_checks = 1; SET unique_checks = 1; SET sql_log_bin = 1;"
if [ -f "$DIR/$BDD/$segment" ]; then
f_log "Delete segment $segment"
rm $segment
fi
SET foreign_key_checks = 1; SET unique_checks = 1; SET sql_log_bin = 1;" && rm $segment
done
if [ ! -f "$DIR/$BDD/$TABLE.txt.bz2" ]; then
f_log "> $TABLE"