Restore MySQLdump –all-databases to other Debian-install

A backup using fex:

:~# /usr/bin/mysqldump –defaults-file=/etc/mysql/debian.cnf –events –all-databases > all.sql

(It’s supposed to be two -‘es before defaults-file, events and all-databases)

Can be restored easily on a new install using this commands:

:~# scp all.sql user@newserver: # To copy the backup to the new server.

On the new server:
:~# mysql -u root -p < all.sql

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s