Storing backups only on a local disk is not a good practice, because you risk losing them if the disk becomes corrupted. It is recommended, therefore, that you send backups to multiple destinations to always be able to restore your databases. In this blog post, we will show how to create regular SQL Server backups and automatically send some of them to a local folder and some to the cloud (Azure Storage, for example) via SqlBak.
The BACKUP DATABASE command syntax allows performing backups by specifying a drive, a network folder or Azure storage as the destination. Although it is not possible to set an Amazon S3 bucket as a backup save point, you can transfer the file to S3 using a batch script or a third-party utility.
For the MySQL database to work quickly and without interruptions, it is necessary to perform maintenance jobs from time to time. This mostly just means running a few commands, but let’s address first things first.
One of the primary responsibilities of the DBA is to create regular backups. However, maintenance of the database is not limited to this.
The mechanisms that enable a relational database to run fast are based on a complex storage system that degrades over time. It leads to a general database slowdown.
The first thing a DBA should do after deploying a database is to ensure that backups are created regularly.
But storing a backup file on the same server where the MySQL server is located would be a big mistake. Therefore, you should create a backup and put it out of the server on which MySQL is located. The simplest solution would be to transfer it to another server via FTP.
The main console utilities for working with MySQL are located in the directory where MySQL Server is installed. However, after installing MySQL Server, it is often difficult to find this directory. The best way is to add this path to your PATH environment variable, and then you can use MySQL and mysqldump utilities directly.
No matter what IT project you are creating, you will always need a sandbox for testing and development. If your product has a MySQL database, then you will need to create a database in a development environment.
If you have an important database, then you need to make sure to back it up regularly. Preferably, you will make sure this happens automatically. But performing regular backups is only half the battle — you also have to consider where to store them. Saving the backups on the same server where the MySQL Server is installed isn’t safe, because if it crashes, you will lose everything.