Comments on: MySQL Point in Time Recovery the Right Way https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/ Tue, 13 Feb 2024 01:00:21 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: anup https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968602 Fri, 27 Oct 2017 11:28:23 +0000 https://www.percona.com/blog/?p=45625#comment-10968602 But will that append the existing binlog?

]]>
By: Emerson S. Gaudencio https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968593 Wed, 25 Oct 2017 13:42:16 +0000 https://www.percona.com/blog/?p=45625#comment-10968593 Hey Marcelo,

Awesome article, So I think its a nice trick if you don’t use xtrabackup or meb(mysql enterprise backup), because It would be more efficient using one of these tools for your backups strategies. Thanks for sharing this one with us.

Take care.

]]>
By: Marcelo Altmann https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968588 Tue, 24 Oct 2017 14:19:28 +0000 https://www.percona.com/blog/?p=45625#comment-10968588 Hi Wolfsrudel.

That is what I explain in the second paragraph. I will quote here for clearness:

> You need to make sure to run a single mysqlbinlog command with all related binlogs, and pipe them to mysql at once.

Thanks for stopping by.

]]>
By: Marcelo Altmann https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968587 Tue, 24 Oct 2017 13:50:23 +0000 https://www.percona.com/blog/?p=45625#comment-10968587 Hi Lefred.

Thanks for pointing it out. Similar approach and can be done with a single instance.

Cheers.

]]>
By: Marcelo Altmann https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968586 Tue, 24 Oct 2017 13:49:17 +0000 https://www.percona.com/blog/?p=45625#comment-10968586 Hi Akshay.

Thanks for your comment. Yes, if the file becomes big and fail for some reason, it becomes a problem.

]]>
By: wolfsrudel85Wolfsrudel https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968585 Tue, 24 Oct 2017 12:58:49 +0000 https://www.percona.com/blog/?p=45625#comment-10968585 You should never use mysqlbinlog this way:

shell> mysqlbinlog binlog.000001 | mysql -u root -p # Creates tmp table X
shell> mysqlbinlog binlog.000002 | mysql -u root -p # Uses tmp table X

but

shell> mysqlbinlog binlog.000001 binlog.000002 | mysql -u root -p

instead.

See the docs: https://dev.mysql.com/doc/refman/5.7/en/point-in-time-recovery.html

]]>
By: Akshay https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968579 Tue, 24 Oct 2017 06:32:36 +0000 https://www.percona.com/blog/?p=45625#comment-10968579 Nice trick as well lefred 🙂

]]>
By: lefred https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968578 Mon, 23 Oct 2017 21:43:55 +0000 https://www.percona.com/blog/?p=45625#comment-10968578 Hi Marcelo,

There is even a better approach then playing with a second instance of MySQL, check this post: http://lefred.be/content/howto-make-mysql-point-in-time-recovery-faster/

Cheers 😉

]]>
By: Akshay https://www.percona.com/blog/mysql-point-in-time-recovery-right-way/#comment-10968577 Mon, 23 Oct 2017 21:30:01 +0000 https://www.percona.com/blog/?p=45625#comment-10968577 Nice trick, faking a master and using the replication protocol.
One more option to restore could be to export the binlogs to a single file and then import that file in mysql ?
mysqlbinlog –base64-output=decode -v binlog.000001 >> binlog.txt
mysqlbinlog –base64-output=decode -v binlog.000002 >> binlog.txt

and then
mysql < binlog.txt

Although if there are too many files to execute then this single file might become large.

]]>