Creating a Backup with innobackupex
$ innobackupex --defaults-file=/etc/my.cnf --user=DBUSER --password=DBUSERPASS /opt/backup/BACKUP-DIR/
$ innobackupex --user=DBUSER --password=DBUSERPASS /path/to/BACKUP-DIR/ --no-timestamp
$ innobackupex --user=LUKE --password=US3TH3F0RC3 --stream=tar ./ | bzip2 -
$ xtrabackup --user=DVADER --password=14MY0URF4TH3R --backup --target-dir=/data/bkps/
$ innobackupex --stream=tar ./ | gzip - > backup.tar.gz
$ innobackupex --compress --compress-threads=8 --stream=xbstream --parallel=4 ./ > backup.xbstream
Make a Local Full Backup (Create, Prepare and Restore)
$ innobackupex --defaults-file=/etc/my.cnf --user=DBUSER --password=DBUSERPASS /data/backups/
$ innobackupex --use-memory=4G --apply-log /data/backups/2010-03-13_02-42-44/
$ innobackupex --copy-back /data/backups/2010-03-13_02-42-44/
$ chown -R mysql:mysql /var/lib/mysql
innobackupex --defaults-file=/etc/my.cnf --user=root --password=123456 --databases="db1 db2" /opt/xtra/
innobackupex --defaults-file=/etc/my.cnf --user=root --password=123456 --databases=db1 /opt/xtra/
innobackupex --defaults-file=/etc/my.cnf --user=root --password=123456 --tables="^db1[.].*" /opt/xtra/
阅读(1299) | 评论(0) | 转发(0) |