mysqldump: use long options, correct command name

client-spec/clarity
Marco Bonelli 2020-03-03 17:53:01 +01:00
parent 536a64ea1c
commit 40af8c1f54
1 changed files with 6 additions and 6 deletions

View File

@ -3,18 +3,18 @@
> Backups MySQL databases.
> More information: <https://dev.mysql.com/doc/refman/en/mysqldump.html>.
- Create a backup, user will be prompted for a password:
- Create a backup (user will be prompted for a password):
`mysqldump -u {{user}} -p {{database_name}} -r {{filename.sql}}`
`mysqldump --user {{user}} --password {{database_name}} -r {{filename.sql}}`
- Restore a backup, user will be prompted for a password:
- Restore a backup (user will be prompted for a password):
`mysql -u {{user}} -p {{database_name}} < {{filename.sql}}`
`mysqldump --user {{user}} --password {{database_name}} < {{path/to/file.sql}}`
- Backup all databases redirecting the output to a file (user will be prompted for a password):
`mysqldump -u {{user}} -p --all-databases > {{filename.sql}}`
`mysqldump --user {{user}} --password --all-databases > {{filename.sql}}`
- Restore all databases from a backup (user will be prompted for a password):
`mysql -u {{user}} -p < {{filename.sql}}`
`mysqldump --user {{user}} --password < {{filename.sql}}`