# copy-back option in xtrabackup for restoring partial backups

**URL:** <https://forums.percona.com/t/copy-back-option-in-xtrabackup-for-restoring-partial-backups/5686>\
**Category:** Percona XtraBackup\
**Created:** [June 16, 2017, 4:42am UTC](https://forums.percona.com/t/copy-back-option-in-xtrabackup-for-restoring-partial-backups/5686 "2017-06-16T04:42:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![msetty](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@msetty](https://forums.percona.com/u/msetty)\
**Post date:** [June 16, 2017, 4:42am UTC](https://forums.percona.com/t/copy-back-option-in-xtrabackup-for-restoring-partial-backups/5686/1 "2017-06-16T04:42:55Z")

</div>

Hi,

I use copy-back option in xtrabackup while doing a full data restore.  
For copy-back option to execute successfully, the data directory should be empty.

Why cant I use the same copy-back option while doing a restore of partial backups instead of manually copying the .\* files to the data directory?  
May I know the limitations of copy-back option and why cant I use it for partial backups as copy-backup option copies the files from the backup directory to the data directory only.

Thanks.

---

<div class="post-metadata">

**Author:** ![miguelangelnieto](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@miguelangelnieto](https://forums.percona.com/u/miguelangelnieto)\
**Post date:** [August 24, 2017, 7:13am UTC](https://forums.percona.com/t/copy-back-option-in-xtrabackup-for-restoring-partial-backups/5686/2 "2017-08-24T07:13:59Z")

</div>

The idea of copy-back is to copy the whole backup to the datadir. Same as move-back, that uses move instead of copy. Those parameters were not created to do partial restores, so won’t work in the way you want. copy-back and move-back are just shortcuts to “cp” and “mv” all files back to the datadir, nothing more.
