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:

  • decompress

    xtrabackup --decompress --remove-original --parallel=16 --target-dir=/path

  • prepare

    xtrabackup --prepare --parallel=16 --target-dir=/path

  • restore

    xtrabackup --copy-back --target-dir=/path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.