MySQL Database Backup


Hello guys

In this post we are going see how to take MySQL database backup and schedule it for daily backup.
1. Create backup user and grant appropriate permissions.


2. Create .my.cnf file with below content. Create this file in home directory of database owner. Set 600 permission for this file.


3. Copy below files to desired locations.
mysql_database_backup.sh mysql_backup_schedule.sh

4. Make changes to mysql_backup_schedule.sh file

  • first parameter to mysql_database_backup.sh is location of mysql bin directory
  • second parameter is location of backup
  • third parameter is database name

5. For daily backup schedule mysql_backup_schedule.sh file execution in crontab


Comments

Popular posts from this blog

Oracle RAC Database QUIESCE Mode

OMS 13c Port Requirement

PostgreSQL pg_controldata utility