For website stability, it is very important to be able to recover from hardware failures and hacker attacks. Therefore, you should always make backups and make sure that they work. Your code and static files will usually reside in version control from which it can be recovered, but database and media files should be backed up regularly.
In this recipe, we will show you how to create backups for MySQL databases.