Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # copy the database source files to destination
- dbname='palus'
- source='/DATA/4GLV/tokudb/'
- destip='192.168.150.137'
- destuser='db'
- destpass='db'
- destport='3306'
- destination="root@$destip:/mnt/data2/"
- time mysqldump --databases $dbname --no-data | mysql -h$destip -u$destuser -p$destpass -P$destport
- if [[ $? -eq 0 ]];then
- mysql -Bse"SELECT CONCAT(' scp $source ', SUBSTR(internal_file_name, 3, 255), ' $destination ') FROM information_schema.TokuDB_file_map WHERE \`database\` = \"$dbname\"" > to_move.txt
- fi
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement