What is the best way to move MySQL data from one server to another

I am switching VPS providers and I want to get my MySQL table data in one server over to another. I currently have a daily mysqldump of all the tables and the biggest tables have in excess of 10M rows and the dump file is approx 4-5GB in size. The import of this is taking many many hours and I am wondering if there is a faster way to do this - something that takes 10 or 15 mins rather than hours and hours. Thanks!

Edit: all my tables are InnoDB


Why not use xtrabackup? Your edit says that your tables are InnoDB. xtrabackup works well for your needs as you describe them.


This way does NOT work in case of Innodb. If Mysql versions are the same, you can try to move files from /var/lib/mysql (depends on your distributive) from one vps to another.
For example in Debian GNU/Linux this will work, but you'll also need to change debian-sys-maint mysql user's password. you can do it this way:
mysql -uroot -p -e "GRANT ALL PRIVILEGES ON . TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '$(sed -n '/password/p;' /etc/mysql/debian.cnf | sed '1d;s/.* //')' WITH GRANT OPTION;"
In case you have different minor mysql version it might work, but theoretically you can have some bugs.


Use MySQL replication here. You should not have problems with versions - as you have VPS not just hosting, as I correctly understand. If performance of second machine would not be much worse than another - Slave should be just seconds behind the master.

Don't forget to stop repication when resigning from the first VPS (someone may issue DROP on Master which would replicate to Slave).

Try to plan for the future - maybe some MyISAM tables won't be enough with bigger traffic - you can have MySQL Slave with some tables on different engines than Master.