I had to take a backup of a single database in my MySQL server of size 2.4 TB. I used percona xtrabackup as mysqldump was taking forever. I used below command for it:
xtrabackup --backup -u user -p pass --history --compress --compress-threads=2 --databases db_name --target-dir=/path/
Now, I need to restore this partial backup in another server (which has other databases in it), but I read online that copy-back option cannot be used for restoring partial backup. So how should I restore this now? Do I need to manually copy the .frm and .ibd files after decompressing?
I thought of below steps for restoring:
xtrabackup --decompress --remove-original --parallel=16 --target-dir=/path
xtrabackup --prepare --parallel=16 --target-dir=/path
xtrabackup --copy-back --target-dir=/path