MariaDB / MariaBackup : the best way to export/migrate a 700GB table to another server, but with only 200GB of free space at the origin

innodbmariadb

Origin server:
1 table – InnoDB
-> 700gb – 1.5 billion records
(Free disk space: 200gb)

Destination server is in the same network.

The destination server will have a lot of free space, the origin only has 200gb free.

1 – The table has 1.5 billion records, so querying line by line would not be the best way.

2 – Possibly the only viable way I found at the moment was to copy the IBD file and try to restore it using TABLESPACE, according to the instructions in this link:
https://community.spiceworks.com/t/recover-mysql-database-from-frm-and-ibd-files/1014394

With MariaBackup I would be able to save the file at the source if I had free space.
Unfortunately, it is not possible to send the file via MariaBackup directly to the origin server over the network, right?

Is there any better way to export besides these two mentioned?

Thanks a lot. =)

Best Answer

Assuming the bandwidth is high, do this on the destination server:

$ mysqldump -u ... -p... -h source_host dbname tablename |
      mysql -u ... -p...                dbname

(If the bandwidth is low, then zipping/unzipping as Kondybas suggests might run up to 3x faster than without zip.)

Related Question