- MYSQL ENTERPRISE BACKUP HOW TO
- MYSQL ENTERPRISE BACKUP INSTALL
- MYSQL ENTERPRISE BACKUP UPDATE
- MYSQL ENTERPRISE BACKUP FULL
Options 1: Using MySQL Enterprise Backup (MEB) Although we do not have any direct Netbackup agent for MySQL, BUT MySQL backup integration with Netbackup achievable via 2 different options.
MYSQL ENTERPRISE BACKUP HOW TO
If you want to know how to restore your backup, see my follow-up post.I have gone through distinct options we have for MySQL backup with Netbackup. You can then schedule it to run daily ( crontab -e) at 04:00 in the morning for example: 0 4 * * * /var/backups/mysql/make-mysql-backup.shįor more information on the topic of MySQL Enterprise Backup, I heavily recommend reading the documentation.
MYSQL ENTERPRISE BACKUP FULL
The full script looks something like this: #!/bin/bashĭATE_HOUR=$(date -port=3306 -protocol=tcp -user=$BACKUP_USER -password=$BACKUP_PASS -with-timestamp -backup-dir=$BACKUP_DIR backup-and-apply-log
Make sure to educate yourself on the backup operations supported by MySQL Enterprise Backup. This option performs an extra stage after the initial backup, to bring all InnoDB tables up-to-date with any changes that occurred during the backup operation, so that the backup is immediately ready to be restored. This is a crucial parameter required for most kinds of backup operations. The directory under which to store the backup data. Useful to maintain a single backup directory containing many backup snapshots. ID and password of privileged MySQL user.Ĭreates a subdirectory underneath the backup directory, with a name formed from the timestamp of the backup operation. Protocol used to connect to the database. Port used to connect to the database instance during backup operations. This command calls the mysqlbackup binary with the following arguments (also see here): Argument The most important command in the script is the following: /usr/local/mysql/bin/mysqlbackup -port=3306 -protocol=tcp -user=$BACKUP_USER -password=$BACKUP_PASS -with-timestamp -backup-dir=$BACKUP_DIR backup-and-apply-log Shell script for full backupīased on your backup concept (you have one, right?), you might want to schedule the following shell script to run multiple times per day, daily or weekly. With these steps complete, we can now create a shell script to automate our backups.
MYSQL ENTERPRISE BACKUP UPDATE
Mysql> GRANT RELOAD ON *.* TO GRANT CREATE, INSERT, DROP, UPDATE ON mysql.ibbackup_binlog_marker TO GRANT CREATE, INSERT, DROP, UPDATE ON mysql.backup_progress TO GRANT CREATE, INSERT, SELECT, DROP, UPDATE ON mysql.backup_history TO GRANT REPLICATION CLIENT ON *.* TO GRANT SUPER ON *.* TO GRANT CREATE TEMPORARY TABLES ON mysql.* TO FLUSH PRIVILEGES Mysql> CREATE USER IDENTIFIED BY 'mysupersecret' Log into the database as root and create the backup user (named backup in my case) and grant the necessary privileges: $ mysql -u root -p Since I did not yet have a backup user for the database, I had to create one. Location for backup data (“ /var/backups/mysql/backups” in this example).Backup user and password (“ backup/mysupersecret” in this example).In this example, I needed the following information: Use this guide to review your configuration and figure out where you want to place your backup. Now we’ve installed the software, we can go on and prepare our database for backup. I then placed the mysqlbackup binary in my MySQL “bin” directory (typically /usr/local/mysql/bin if you installed MySQL as described in the documentation): $ cp meb-3.9.0-linux2.6-x86-64bit/bin/mysqlbackup /usr/local/mysql/bin/ Do so by following this guide: $ tar xvzf meb-3.9.
MYSQL ENTERPRISE BACKUP INSTALL
Install the softwareīefore we can configure backups and the like, you’ll need to install the MySQL Enterprise Backup software. My most important resource for this task was the MySQL Enterprise Backup User’s Guide. I recently had the task to implement MySQL Enterprise Backup for a MySQL database (mysql-advanced-5.6.15-linux-glibc2.5-x86_64). This means that for all my backup needs, I am using Oracle Recovery Manager (RMAN). As you might know, I am primarily an Oracle guy.