With the support for cloud backups in MEB, distributing innodb
tables across multiple MySQL instances has become easier.
1. Backup - take a cloud(Amazon S3) backup of the tables
to be shared using the --use-tts=with-full-locking option.
./mysqlbackup \
--host=localhost --user=mysqluser --protocol=TCP --port=3306
\
--cloud-service=s3 --cloud-aws-region=us-east-1 \
--cloud-bucket=mebbackup –cloud-object-key=items.img \
--cloud-access-key-id=<access-key>
--cloud-secret-access-key=<secret-key> \
--include-tables=^mycompany\.items.* --use-tts=with-full-locking
\
--backup-dir=/tmp/bkups/backupdir --compress --backup-image=- …
In addition to my recent post, I just had to go into using the –use-tts for specific tables and selective backup sets.
As all my schemas were employeesn, I thought it would be a good idea to run:
mysqlbackup -uroot --socket=/tmp/mysql.sock --backup-dir=/home/mysql/MEB/restore \ --with-timestamp --use-tts --include=employees* backup
as I want all the tables. If I only wanted a specific table, say ‘salaries’ I could have done:
mysqlbackup -uroot --socket=/tmp/mysql.sock --backup-dir=/home/mysql/MEB/restore \ --with-timestamp --use-tts --include=employees*\.*salaries backup
and backup just the ‘salaries’ tables but from all the employeesn databases.
then.. be a mean little dba:
drop database employees; drop database employees10; drop database employees11; .. .. drop database employees2; drop database employees20; drop database …[Read more]
In this post I go into some performance metrics and time spent on using MySQL Enterprise Backup instead of mysqldump, and seeing how far I could go with some parallel configuration.
Setup:
It’s on an old laptop:
–Ubuntu 12.04 LTS, 32bit Intel Pentium M 1.86Ghz, 2Gb –Source disk: internal 80Gb ATA ST9808211A –Destination: external 1Tb SAMSUNG HD103SI –MySQL Enterprise Edition 5.6.15 –MySQL Enterprise Backup 3.9.0 –Employees sample database duplicated via MySQL Utilities 1.3.6 (on Win7 PC) to generate a ~5Gb MySQL Server. And to simulate data size, I used the MySQL Utilities:
mysqldbcopy --source=root:pass@host:3356 --destination=root:pass@host:3356 employees:employees1 \ employees:employees2 employees:employees3 employees:employees4 ... employees:employees18 \ employees:employees19 employees:employees20
…
[Read more]In this post I go into some performance metrics and time spent on using MySQL Enterprise Backup instead of mysqldump, and seeing how far I could go with some parallel configuration.
Setup:
It’s on an old laptop:
–Ubuntu 12.04 LTS, 32bit Intel Pentium M 1.86Ghz, 2Gb –Source disk: internal 80Gb ATA ST9808211A –Destination: external 1Tb SAMSUNG HD103SI –MySQL Enterprise Edition 5.6.15 –MySQL Enterprise Backup 3.9.0 –Employees sample database duplicated via MySQL Utilities 1.3.6 (on Win7 PC) to generate a ~5Gb MySQL Server. And to simulate data size, I used the MySQL Utilities:
mysqldbcopy --source=root:pass@host:3356 --destination=root:pass@host:3356 employees:employees1 \ employees:employees2 employees:employees3 employees:employees4 ... employees:employees18 \ employees:employees19 employees:employees20
…
[Read more]