innobackupex

The innobackupex utility is included with the percona-xtrabackup rpm. It’s a good utility to create binary backups with binary logs and a good alternative to mysqldump as your database grows.

# make a backup under /tmp/backup
innobackupex --user=root --password=MyS3cretPW /tmp/backup

# make a backup under /tmp/backup including slave info
# the safe-slave-backup flag locks tables to ensure consistency
innobackupex --user=root --password=MyS3cretPW --slave-info --safe-slave-backup /tmp/backup

After making a backup, you must apply the binary log to bring it up to date with all activity that took place on the database while the backup was in progress.

innobackupex --user=root --password=MyS3cretPW --apply-log /tmp/backup/YYYY-MM-DD_HH-mm-ss
(Comments)

Comments