Replies: 5 comments
-
@hakastein Source db is also a filter, in order to avoid db.table1 to be skipped, you need to use |
Beta Was this translation helpful? Give feedback.
-
Initially, I tried without --source-db but it still doesn't work. Eventually, I gave up on -T and replaced it with --regex=^db.(table1|table2)$ and it works great. And I just mistyped it. I have --source-db specified as db. |
Beta Was this translation helpful? Give feedback.
-
This is part of my bash script. This is working # Prepare the table list, appending the database name to each table.
table_list=""
for table in "$@"; do
table_list+="$table|"
done
# Trims trailing comma
table_list="^$dbSource\.(${table_list%?})$"
# Restore each specified table from the directory
start_time=$(date +%s)
echo "Start Restore Process"
overwrite_flag=""
if [ "$overwrite" == 1 ]; then
overwrite_flag="--overwrite-tables"
fi
echo "$table_list"
myloader --defaults-extra-file="$defaults_file" \
--source-db="$dbSource" \
--database="$dbTarget" \
"$overwrite_flag" \
--ask-password \
--skip-triggers \
--regex="$table_list" \
--verbose=1 \
--directory="$dir" And this one is not # Prepare the table list, appending the database name to each table.
table_list=""
for table in "$@"; do
table_list+="$dbSource.$table,"
done
# Trims trailing comma
table_list="${table_list%?}"
# Restore each specified table from the directory
start_time=$(date +%s)
echo "Start Restore Process"
overwrite_flag=""
if [ "$overwrite" == 1 ]; then
overwrite_flag="--overwrite-tables"
fi
echo "$table_list"
echo myloader --defaults-extra-file="$defaults_file" \
--source-db="$dbSource" \
--database="$dbTarget" \
"$overwrite_flag" \
--ask-password \
--skip-triggers \
--tables-list="$table_list" \
--verbose=1 \
--directory="$dir" |
Beta Was this translation helpful? Give feedback.
-
@hakastein, I was not able to reproduce your issue, what version are you using? |
Beta Was this translation helpful? Give feedback.
-
myloader v0.15.1-3, built against MySQL 8.0.33-25 with SSL support |
Beta Was this translation helpful? Give feedback.
-
When I use the command like this
myloader --defaults-extra-file=/tmp/tmp.6NOM7FbCwD --source-db=db --database=restore_table --ask-password --skip-triggers --tables-list=db.table_1,db.table_2,db.table_3 --directory=/data
I only see warnings like this
What i am doing wrong? As soon as I remove this option, everything works as it should.
Beta Was this translation helpful? Give feedback.
All reactions