Not the answer you need?
Register and ask your own question!

a bit confused

itworker7itworker7 EntrantLegacy User Role Beginner
Hi, I'm trying to do an incremental restore and I'm a bit confused.
What I've done:

I have two systems Prod and Dev. I made a full backup of the Prod db about 2 weeks ago. I copied that backup to the Dev system and successfully restored it, with no issues. Now I want to use an incremental backup to bring Dev up to date with Prod and then start replication.

I've started with a clean system by deleting the Dev db and again doing the full backup restore. *I have not yet restarted the Dev db.* I then ran an incremental backup on Prod, setting --incremental-lsn to the value of to-lsn from the xtrabackup_checkpoints file (because that backup is on the Dev server and is no longer available on the Prod server. The incremental backup completed and I've copied it to the Dev system.

Where I'm confused:
The docs seem to want me to apply the incremental backup to the base backup dir but I don't want to mess up my full backup - it takes 8 hours to get that from tape. I just want to apply the incremental to the newly restored db. Remember, I have not restarted mysql after the full backup restore - can't I just copy the incremental to the /var/lib/mysql dir and startup? I need to keep the original full mysql backup untouched in case I have to do this again.

Any suggestions or ideas would be greatly appreciated,

thanks,

T

Comments

  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    Hi itworker7;

    The incremental backup is based off the full backup, so it must be applied to the full backup to be used. Think of it just as a set of changes that need to be applied to the full backup, which on their own are useless since it's not a full data copy. Do you have enough free disk space on the server to just copy the backup to another location in case you need to re-do it (i.e. keep two copies)?

    However it sounds like you already did a normal --apply-log to the full backup though, which means that you may already be out of luck on that one. The normal steps are to perform --apply-log --redo-only to the full backup, then apply the incremental backup to the full backup, and then finally do a normal --apply-log on the full backup again.

    http://www.percona.com/doc/percona-xtrabackup/2.2/howtos/recipes_ibkx_inc.html

    -Scot
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.