Your base is the one that needs to be prepared with --apply-log-only.
Basically, apply log only means you don’t want to rollback transactions that are not completed by the end of backup, because the changes are that they might get a commit on the next incremental.
So you do for all backups expect the last: --prepare --apply-log-only
Last backup: --prepare
InnoDB: Are you sure you are using the right ib_logfiles to start up the database? Log sequence number in the ib_logfiles is 3058241, less than the log sequence number in the first system tablespace file header, 3058737.
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Page [page id: space=0, page number=7] log sequence number 3058728 is in the future! Current system log sequence number 3058267.
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files.
From your previous reply, you did on /xb.nfs/store50b/site000/base a --prepare then on /xb.nfs/store50b/site000/inc1 you did a --prepare --apply-log-only
InnoDB: Are you sure you are using the right ib_logfiles to start up the database? Log sequence number in the ib_logfiles is 3058241, less than the log sequence number in the first system tablespace file header, 3058737.
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Page [page id: space=0, page number=7] log sequence number 3058728 is in the future! Current system log sequence number 3058267.
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files.
Once you have prepared a backup with only --prepare you cannot use it for a new incremental.
Here at point 7, you are running --prepare --apply-log-only on /xb.nfs/store50b/site000/base however, your already did a --prepare without --apply-log-only on this folder at step 4.
I was assuming that a base folder that has been prepared and merged is the same as a base folder immediately after a full backup. Is that not the case?
We want to take a daily incremental and merge it with the base, and just keep doing that over and over. After the first full backup, we don’t ever want to take another full backup.
We want to have a backup procedure like this:
full backup
incremental
merge
incremental
merge
incremental
merge
…etc.
Once you have ran the --prepare without --apply-log-only that folder is like a mysql datadir ready to be used.
You cannot from this point forward try to apply another incremental backup to it.
What you can do on your merge is to always --prepare it with --apply-log-only. In case something happens and you have to use the merge, you just need to run --prepare once again to go through the rollback phases and make the backup dir ready to be used.
That suggestion seems to work! I am still getting the following warning, but at least it not talking about a corrupt database any more.
InnoDB: Are you sure you are using the right ib_logfiles to start up the database? Log sequence number in the ib_logfiles is 3058411, less than the log sequence number in the first system tablespace file header, 3058718.