2

Basically Percona Innobackupex consist with three steps: 1. Backup 2. Apply log 3. Copy back restore during emergency

My question: When should I do apply log? Is it after each backup or before emergency restore?

1 Answer 1

2

If you apply the redo log right after a backup copy is taken you can greatly reduce time to restore.

Sometimes --apply-log step fails. Due to a bug or tablespace corruption. In either case you don't want to learn that in the emergency. That's one more argument to do the --apply-log after the backup.

People don't apply the redo log because it brings in more complexity to the backup process. For example, you cannot stream and apply the log. If you take incremental backups the --apply-log makes it even more complex and you loose any intermediate recovery points (at best you'll have a state as of full backup time and the most current state. It may be OK though).

13
  • for my case, it make sense not apply log before emergency happen. May I know if it's possible to test apply-log each time after backup is done? Jun 10, 2015 at 11:52
  • Well, you can take a copy of the backup, test the apply-log and trash it. This is something unusual though. Would you mind describing what you want to achieve?
    – akuzminsky
    Jun 10, 2015 at 16:15
  • I want to ensure backup is not corrupted. After you said apply log might fail, I am little bit scare, so I want to know if it's possible to test apply log. Jun 11, 2015 at 0:27
  • Then take a backup, apply the log and store it until you need it. This way you'll be sure --apply-log succeeds and the restore time will decrease. When you need to restore just copy the backup copy to datadir, change ownership to mysql and you're ready to go.
    – akuzminsky
    Jun 11, 2015 at 0:40
  • but for incremental backup, I can't do apply log right? Jun 11, 2015 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.