Skip to content


MySQL maintenance – making and restoring backups

I use this to back up a MediaWiki and a phpBB database. This is just a generic way to back up and restore databases with MySQL. You may want to compress this too, but we’ll cover only the very basics here, eg just do a backup and restore it.

To make the backup:

mysqldump –user=[the user] –password=[the password] [database name] > [target path/target file.sql]

To restore the backup:

mysql –verbose –user=[the user] –password=[the password] [database name] < [backup path/backup file.sql]

NB: –verbose is optional and slower, but I like using it :D

Posted in MySQL, web development.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.