Hello all,
As I am new to Xtrabackup I am facing some difficulties on how to restore an incremental backup. In more details:
Step 1. Take a fll backup
Step 2. Create an incremental backup
[COLOR=#B22222] #[COLOR=#B22222]innobackupex --incremental --user= --password= /home/mysql_test/MYSQL_BACKUPS/ --incremental- basedir=/home/mysql_test/MYSQL_BACKUPS/2015-05-14_15-55-09_FULL_BACKUP
where[/B]2015-05-14_15-55-09_FULL_BACKUP → latest full backup
[B]
The above will create another dir under [B][/B]/home/mysql_test/MYSQL_BACKUPS/ with execution date e.g 2015-05-15_15-55-09_1st_INCREMENTAL_BACKUP
Step 3. Create another incremental backup:
[COLOR=#B22222] #[B][COLOR=#B22222]innobackupex --incremental --user= --password= /home/mysql_test/MYSQL_BACKUPS/ --incremental- basedir=/home/mysql_test/MYSQL_BACKUPS/2015-05-15_15-55-09_1st_INCREMENTAL_BACKUP
[/B]and this will create the next incremental backup: e.g 2015-05-16_15-55-09_2nd_INCREMENTAL_BACKUP
So up to now we have one full and 2 incremental backups under our backup directory:
/home/mysql_test/MYSQL_BACKUPS/
[B][I]- 2015-05-14_15-55-09_FULL_BACKUP
- 2015-05-15_15-55-09_1st_INCREMENTAL_BACKUP[/I][/B]
-2015-05-16_15-55-09_2nd_INCREMENTAL_BACKUP
Here is where I face my dificulties and need your help, how to restore one of my 2 incremental backups…
Based on [B][U][url]https://www.percona.com/doc/percona-xtrabackup/2.2/innobackupex/incremental_backups_innobackupex.html[/url][/U][/B] before restoring an incremental backup we need to prepare it where I do:
Step 4. Prepare the incremental backup:
[COLOR=#B22222] [COLOR=#B22222]#[COLOR=#B22222]innobackupex --apply-log --redo-only /home/mysql_test/MYSQL_BACKUPS/[COLOR=#FF0000]<???????>
Question 1. Which incremental I should use for this command, should I use this command for all the incrementals created above (1st… and 2nd…)
Question 2. After preparing my incremental backups (if this is what I have to do on Step 4) how do I restore one incremental backup e.g the latest one 2015-05-16_15-55-09_2nd_INCREMENTAL_BACKUP
Thank you all and looking forward for your suggestions
George