Child pages
  • MySQL Backup and Restore
Skip to end of metadata
Go to start of metadata

Backup and restore of MySQL should be done using the utilities that come packaged with MySQL. This section briefly describes the process.

Backup

Backup should be taken using the mysqldump utility. Following is the syntax of command.

mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]

[username] - this is your database username
[password] - this is the password for your database
[databasename] - the name of your RMsis database
[backupfile.sql] - the file to which the backup should be written.

Restore

Backup taken using mysqldump is an SQL dump. You can restore the database using any MySQL client. Following is the command syntax for the CLI mysql client.

mysql -u [username] -p [password] [database_to_restore] < [backupfile.sql]
  • No labels