문제

I want to backup a tokudb database.

I want to be able to restore it to the most recent state. Which I am writing to a file at backup.

My guess would be to run something like this

mysql -e "SHOW MASTER STATUS; SHOW SLAVE STATUS; FLUSH LOGS" > mylogposition.log

Which will rotate the log files after saving the position?

도움이 되었습니까?

해결책

As long as you have done flush logs and you have taken the logfilename just before flush logs say it should be fine.

Example current binlog file is bin-log00333 and after flush logs it is bin-log00334. You may scp the logs from bin-log00001 to bin-log00333 and don't take bin-log00334.

다른 팁

Is this a Master? Or a Slave?

FLUSH LOGS, by itself, will start new log files. (Please verify that this happens.) Then the old files are properly closed and can be copied. And the POS is 0. (4 also works for a binlog.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top