copy-back option in xtrabackup for restoring partial backups

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.

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.