January 2018
Intermediate to advanced
446 pages
12h 57m
English
Log in to the server where the backups are available:
shell> cat /backups/full_backup.sql | mysql -u <user> -porshell> mysql -u <user> -p < /backups/full_backup.sql
To restore on the remote server, you can mention the -h <hostname> option:
shell> cat /backups/full_backup.sql | mysql -u <user> -p -h <remote_hostname>
When you are restoring a backup, the backup statements will be logged to the binary log, which can slow down the restoration process. If you do not want the restoration process to write to the binary log, you can disable it at the session level using the SET SQL_LOG_BIN=0; option:
shell> (echo "SET SQL_LOG_BIN=0;";cat /backups/full_backup.sql) | mysql -u <user> -p -h <remote_hostname>
Or using:
mysql> SET SQL_LOG_BIN=0; ...
Read now
Unlock full access