January 20, 2022

MySQL - mysqlbackup commands

mysqlbackup commands in MySQL database


mysqlbackup utility in MySQL/MariaDB to perform complete or full backups and incremental backups. And to restore full/incremental backups.

mysqlbackup --defaults-file=/usr/local/mysql/my.cnf backup
mysqlbackup --defaults-file=/usr/local/mysql/my.cnf --compress --user=backupadmin --password --port=3309 backup
mysqlbackup --show-progress --show-progress=file:meb_output --backup-dir=/full-backup backup
mysqlbackup --user=dba --password --port=3306 --with-timestamp --backup-dir=/export/backups backup

mysqlbackup --backup-dir=/export/backups/latest backup
mysqlbackup --incremental --start-lsn=1234567 --incremental-backup-dir=/path/to/incbackup backup
mysqlbackup --incremental --incremental-backup-dir=/var/mysql/backup/latest --incremental-base=dir:/var/mysql/backup/previous backup
mysqlbackup --incremental-with-redo-log-only --incremental-backup-dir=/var/mysql/backup/latest --incremental-base=dir:/var/mysql/backup/previous backup
mysqlbackup --backup-dir=/path/to/backup apply-log

mysqlbackup --src-entry=meta/comments.txt --dst-entry=/tmp/my-comments.txt --backup-image=/var/myimage.bki extract
mysqlbackup --user=mysqlbackup --password --host=127.0.0.1 --backup-image=/home/mysqlbackup/backups/my.mbi --backup-dir=/home/mysqlbackup/backup-tmp backup-to-image
mysqlbackup --user=mysqlbackup --backup-image=/backup/my.mbi list-image
mysqlbackup -uroot --backup-dir=/logs/backupext validate
mysqlbackup -uroot --backup-image=/logs/fullimage.mi validate
mysqlbackup --backup-image=/meb/backups/image.mbi --decrypt --key-file=/meb/enckeyfile validate
mysqlbackup --datadir=/home/admin/bin/mysql-8.0.26/datadir --backup-image=/home/mysqlbackup/backups/my.mbi --backup-dir=/home/mysqlbackup/backup-tmp copy-back-and-apply-log


Related MySQL Articles:  MySQL mysqldbexport cheatsheet   mysqlpump commands in MySQL


No comments:

Post a Comment