Restore data plus data migration (personal notes, the reader useless)

Use of xtrabackup do to recover data, the number of pumping back to hdfs big data platform for the hive to create the appearance of using.
 
Get zichan.tar.gz (directory). Inside is a compressed package.
    
# Decompression zichan. Tar .gz
 tar zvxfi XXXXX. Tar .gz 
# Create a backup directory zichan, and zichan. Tar .gz same directory.
mkdir zichan 
# will XXXXX. tar .gzmv to the backup directory.
mv XXXXX. tar .gz ../zichan/ 
# restore data command (modify the actual situation on their own path), after the completion of their own, see " Completed the OK! " will be successful.
/ opt / Percona-xtrabackup- 2.4 . 14 -linux-the x86_64 / bin / innobackupex --defaults File = / mnt / disk1 / zichan. the tar .gz / Back-log---apply the my.cnf / mnt / disk1 / . zichan tar .gz / 
part inside of the decompression do not delete the directory # 
RM -mysql the RF
 RM - the RF information_schema
 RM - the RF the Test 
# mv file to the database data directory of local mysql. (Cp file is too large, then too slow) 
mv / mnt / disk1 / zichan. Tar .gz / zichan * / mnt / disk1 / mysql / the Data / 
# will zichan. Tar all the files in the directory .gz cp to a local mysql data directory. You will be prompted to cover the same file at the data, direct "y".
CP / mnt / disk1 / zichan. the tar .gz / * / mnt / disk1 / MySQL / data / 
View # modify user and user group data in the file path. 
-R mysql chown: mysql ./ 
# restart mysql, this time you can log in mysql database mv saw all over the (zichan ***). 
Start MySQL Server 
# draw several stages ① (mysql to hdfs). Java jar and modify the path where conf.properties, this jar is drawn numbers. 
# Revise 1, mysql where ip
# 2 modify, amend mysql database you want extracted. 
# 3 modification, the number of threads, it can not change. The modifications and code related? Or performance related nodes? Code has not yet seen. 
# Number of pumping stage ②, run the jar package. 
the Java -jar xxxx.jar & nohup 
# view the running process and result. When the end of all threads is complete. Can be deleted after the completion of nohup.out (nohup logs) 
tail -f nohup.out 
# last step, just off the end of the java process running. 
ps -ef | grep jar package jar package keyword or 
kill -9 process ID
 

Guess you like

Origin www.cnblogs.com/singsong-ss/p/10986193.html