Skip to content

Commit

Permalink
Added backup & export details to mysql notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Hermosilla committed Jul 20, 2017
1 parent c506f08 commit 2838168
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@
`--defaults-file=user_pass.cnf`
`--login-path`

## Exports
```shell
# If you have a larger db you gotta use --max_allowed_packet
mysqldump --max_allowed_packet=500M --single-transaction --events --databases dbname > backup-dbname-$(date +%Y-%m-%d_%H-%M).sql

# Export all databases
mysqldump --all-databases > backup-all-$(date +%Y-%m-%d_%H-%M).sql

# Export database schema with triggers & routines
mysqldump --no-data --routines --triggers > schema.sql
```

- https://serversforhackers.com/c/mysqldump-with-modern-mysql
- http://www.ducea.com/2007/07/25/dumping-mysql-stored-procedures-functions-and-triggers/
- http://loopj.com/2009/07/06/fast-mysql-backup-restore/
- http://francis-besset.com/backup-your-mysql-servers-and-restore-them-quickly.html



## Links
- https://speakerdeck.com/samlambert/the-mysql-ecosystem-at-github-2015
- https://www.percona.com/blog/2017/03/06/mysql-i-am-a-dummy/
Expand Down

0 comments on commit 2838168

Please sign in to comment.