Hi jure12,
FOR BIG DATABASES
AVOID EXPORT MYSQL ---> DOWNLOAD ---> UPLOAD ---> IMPORT
USE PACK ---> HIGH SPEED TRANSFER BETWEEN DATACENTERS ---> UNPACK
Anything to do with export from mysql has given many problems. I do a transfer by archiving it and unpacking the archive, a method that is reliable.
FOR THIS YOU DO NOT NEED TO DOWNLOAD THE BACKUP FILE TO YOUR COMPUTER!
#####################################
Do the following:
1) OLD SERVER: PREPARE FOR TRANSFER AND PACK
Make a tar of the corresponding database from # shell and make it accessable on the internet.
mkdir /home/clientname/domain.com/download_dir_name
cd /home/clientname/domain.com/download_dir_name
tar -zpcf backup.tgz /var/lib/mysql/db_name
2) NEW SERVER: CONNECT AND DOWNLOAD BY WGET METHOD AND UNPACK
You can use the following to download the backup by following:
mkdir /root/download
cd /root/download
wget https://domain.com/download_dir_name/backup.tgz --no-check-certificate
tar -zxvf backup.tgz
Then you are done.
#####################################
In the above step, the database is made available for download via internet. You can add password protection to download_dir_name or backup.tgz, or do without it.
If you add password protection to download_dir_name, then you must make the wget connection with username and Password.
If you add Password protection to backup.tgz, then you must give it during unpacking by tar -zxvf.
When you download the file to your computer, then you use the download speed of your internet connection of downloadstream. When you upload this file, you use 8 times slower internet connection speed of upstream.
When you make a secure wget connection, you use 10-30 times faster connection from new server to old server for download and transfer the file in compressed format depending the network card attached to both servers and load on the servers.
The advantage of this method is that you DOWNLOAD THE FILE USE HIGH SPEED TRANSFER BETWEEN DATACENTERS.
---------------------------------------------------------
You should have created a db_name under the client in new server. Simply copy contents of the archive uncompressed under /root/download to the respective /var/lib/mysql/db_name. Then you are done.