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

Backup restoration in different directory.

MarcosMarcos EntrantInactive User Role Beginner

I'm making incremental backups using xtrabackup.
My problem is that I can't find how do I have to do to perform the restoration.

I'd like to restore (prepare) my backup into a different directory where the backup is.
Else I think that when I apply my incremental backups will overwrite full backup information.

At the moment I'm copying full backup directory in a tmp one and then I prepare the incremental backups.
I have 31 GB of backup and to copy it is a long process.

As I understand, if I apply incremental backups over a full backup I'll get the full backup after the incremental period. But I'll lose my previous full backup, isn't it?
I need to keep my full backup as it was before.

Anyone knows how could I prepare a incremental backup pointing a different directory?
I can't find any information about it.
I've tried using different options as --datadir, --tmpdir even --targetdir (that I don't rememeber where found it) but my tmp directory continues being empty.



  • wagnerbianchiwagnerbianchi Remote DBA Current User Role Patron
  • MarcosMarcos Entrant Inactive User Role Beginner

    I've seen this page, but maybe I don't undetstand the working.

    As I can see I could apply-log over BASE-DIR (that I understand is where the full backup is) and then I apply incremental logs over this BASE-DIR. Then I'll have a "full backup" up to the time of the incremental one in BASE-DIR. As I see then I'll had lost my first full backup, isn't it?
    I can't lose the base full backup.

    That I need is to be able to keep recovering information any moment of the past.
    My incremental backup are done each two hours, and maybe I could need 12:00PM information and later to recover 8.00AM info.

    I don't know if is possible to do it by a easy way :/

    Thanks again!

  • George LorchGeorge Lorch Percona Percona Moderator Role Patron
    You need to make a copy of your full backup if you want to keep it. Copy it to a 'staging' area where you will apply incrementals to it and keep the original in some safe place.

    George O. Lorch III
    Software Engineer, Percona
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.