Backups and restore
Make logical backups, verify them and practise restoring.
What you will be able to do
- Schedule backups and keep several generations.
- Encrypt backups at rest.
- Restore into a separate database to verify.
- Record the restore runbook.
In plain English
A backup you have never restored is a hope. Use mysqldump for logical backups or physical snapshots for large databases. Test the restore into a scratch database and compare row counts.
mysqldump --single-transaction --routines --triggers edubyte > edubyte.sql
mysql -e 'CREATE DATABASE edubyte_restore'
mysql edubyte_restore < edubyte.sql
mysql -e 'SELECT COUNT(*) FROM edubyte_restore.lessons'Your turn
EasyWrite a dump command
Write a mysqldump command for the edubyte database using --single-transaction.
BASH · starter
mysqldumpCheck your understanding before moving on.
Knowledge checkQuestion 1
Which flag gives a consistent InnoDB backup without blocking writes?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.