mysql backup and restore (dump and restore)


#>mysqldump -u root -ppassword --databases <databasename> > '/path/tobackup.sql'
#>mysqldump -u root -ppassword --all-databases > '/path/tobackup.sql'
#>mysqldump -u root -ppassword <databasename> <tablename> > '/path to backup.sql'

Restoration 

mysql -uroot -ppassword databasename < '/path to backup file'

Comments