Hi Team,
I observed that for percona xtrabackup 2.4,
After the prepare step, I still see the redo and undo log files in the directory.
Wanted to check are the redo/undo log files required for restore?
Hi Team,
I observed that for percona xtrabackup 2.4,
After the prepare step, I still see the redo and undo log files in the directory.
Wanted to check are the redo/undo log files required for restore?
Welcome to Percona community @Rishabh_Gupta ,
Please review the How Percona XtraBackup Works - Percona XtraBackup page. You should be able to find your answer in first two para:
This works because InnoDB maintains a redo log, also called the transaction log. This contains a record of every change to InnoDB data. When InnoDB starts, it inspects the data files and the transaction log, and performs two steps. It applies committed transaction log entries to the data files, and it performs an undo operation on any transactions that modified data but did not commit.
Thanks,
K
Yeah from the description it feel that we dont required the redo log files after the prepare step.
Then why do we have them in the folder after the prepare step?
hmmm! So what point are you making?
If I have to guess, “Delete them after apply”? → But then when you start mysql, it will have to recreate them! Which will be slower!
Also, there is no specific gain by deleting them!
Let us know what are your thought.
Thanks,
K
Yeah, I just wanted to understand the use of these file after prepare step.
I just wanted to confirm even if we delete them before starting the mysql it will not affect the restore.
Mysql will take care of recreating the redo/undo log files.
But I agree with your point there is no specific gain in deleting them.
@Rishabh_Gupta , the prepare step is comprised of 2 smaller steps. The first step replays/merges any completed transactions that were in process during the backup process. Stage 2 recreates the redo logs and completes any other clean up. This allows you to immediately start mysql on this prepared directory. If you remove the redo logs, then mysql will recreate them anyways. By doing this as part of the prepare, you save yourself a little bit of time.
Unanswered | Unsolved | Solved
MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright © 2006 - 2024 Percona LLC. All rights reserved.