سؤال

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