2014-04-15 09:54:01 +01:00
|
|
|
# mysqldump
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Backups mysql databases.
|
2014-04-15 09:54:01 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Create a backup, user will be prompted for a password:
|
2014-04-15 09:54:01 +01:00
|
|
|
|
2015-12-28 22:49:37 +00:00
|
|
|
`mysqldump -u {{user}} --password {{database_name}} > {{filename.sql}}`
|
2014-04-15 09:54:01 +01:00
|
|
|
|
2016-01-16 14:12:05 +00:00
|
|
|
- Restore a backup, user will be prompted for a password:
|
2014-04-15 09:54:01 +01:00
|
|
|
|
2015-12-28 22:49:37 +00:00
|
|
|
`mysql -u {{user}} --password {{database_name}} < {{filename.sql}}`
|