0

I want to backup mysql databases to another new server. I don't want to use mysql replication and mysqldump for backup as they are using higher cpu and higher i/o on server. I tried mysqlhotcopy to send databases files to another server into /var/lib/mysql/database but after backup new server shows empty database. Help me friends to find solution. Is there any way to send database raw files using rsync or scp and get recovered database ?

3
  • i'ld try rsyncing /var/lib/mysql Jun 13, 2013 at 4:30
  • 1
    You can't copy a file that's open for writing and expect a consistent result, more so with a database comprising also RAM and file transaction caches. rsync may well work if first you shut down the MySQL server. If taking the database offline is out of the question, you must use database-aware tools to copy a live database. All else is madness.
    – Salt
    Jun 13, 2013 at 6:33
  • 1
    You have three options. Firstis to take the availability hit and shut-down the DBMS to copy the data folder to the new machine. Second is to take the performance hit and use the native server tools for dumping your data. Third is to take the complexity hit and set-up a hot replication infrastructure. Anything else will result in data inconsistency at best or to data corruption at worst.
    – hmayag
    Jun 13, 2013 at 8:04

1 Answer 1

3

We can rsync mysql database folder /var/lib/mysql to another server. Mysql versions should be same and server should be shutdown.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .