# Backup restoration in different directory.

**URL:** <https://forums.percona.com/t/backup-restoration-in-different-directory/4827>\
**Category:** Percona XtraBackup\
**Created:** [April 7, 2016, 6:34am UTC](https://forums.percona.com/t/backup-restoration-in-different-directory/4827 "2016-04-07T06:34:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcos\_Vidal\_Tomas](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcos_vidal_tomas/32/7009_2.png) [@Marcos\_Vidal\_Tomas](https://forums.percona.com/u/Marcos_Vidal_Tomas)\
**Post date:** [April 7, 2016, 6:34am UTC](https://forums.percona.com/t/backup-restoration-in-different-directory/4827/1 "2016-04-07T06:34:45Z")

</div>

Hello:

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.

Thanks!!

---

<div class="post-metadata">

**Author:** ![wagnerbianchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/wagnerbianchi/32/802_2.png) [@wagnerbianchi](https://forums.percona.com/u/wagnerbianchi)\
**Post date:** [April 7, 2016, 8:47am UTC](https://forums.percona.com/t/backup-restoration-in-different-directory/4827/2 "2016-04-07T08:47:33Z")

</div>

Hello Marcos, have you read this following page for further information about the process?  
[url][Incremental Backups with innobackupex](https://www.percona.com/doc/percona-xtrabackup/2.3/innobackupex/incremental_backups_innobackupex.html#restoring-incremental-backups-with-innobackupex%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![Marcos\_Vidal\_Tomas](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcos_vidal_tomas/32/7009_2.png) [@Marcos\_Vidal\_Tomas](https://forums.percona.com/u/Marcos_Vidal_Tomas)\
**Post date:** [April 8, 2016, 3:29am UTC](https://forums.percona.com/t/backup-restoration-in-different-directory/4827/3 "2016-04-08T03:29:04Z")

</div>

Hello,WB.

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!

Marcos.

---

<div class="post-metadata">

**Author:** ![George\_Lorch](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/george_lorch/32/1108_2.png) [@George\_Lorch](https://forums.percona.com/u/George_Lorch)\
**Post date:** [April 8, 2016, 8:16am UTC](https://forums.percona.com/t/backup-restoration-in-different-directory/4827/4 "2016-04-08T08:16:15Z")

</div>

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
