1

I am trying to restore some databases, which were backed up with MySQL Enterprise Backup (MEB).

The backup uses both full compressed backups and incremental backups.

There is no problem if I restore the full compressed backup, but when I restore the incremental backups, it deletes any other table in the server.

This is the commands to generate the backups:

mysqlbackup --login-path=usrbackup --socket=/var/lib/mysql/mysql.sock --compress
    --backup-dir=/backups/mydb-full --backup-image=/backups/mydb-full/full-mydb.mbi
    --include-tables=^mydb\. --exclude-tables=\.temp.+
    backup-to-image

mysqlbackup --login-path=usrbackup --socket=/var/lib/mysql/mysql.sock --incremental
    --incremental-base=dir:/backups/mydb-full
    --backup-dir=/backups/mydb-inc01 --backup-image=/backups/mydb-inc01/inc-mydb.mbi
    --include-tables=^mydb\. --exclude-tables=\.temp.+
    backup-to-image

mysqlbackup --login-path=usrbackup --socket=/var/lib/mysql/mysql.sock --incremental
    --incremental-base=dir:/backups/mydb-inc01
    --backup-dir=/backups/mydb-inc02 --backup-image=/backups/mydb-inc02/inc-mydb.mbi
    --include-tables=^mydb\. --exclude-tables=\.temp.+
    backup-to-image

And these are the commands to restore the backups

mysqlbackup --login-path=usrbackup --socket=/var/lib/mysql/mysql.sock --uncompress
    --backup-dir=/backups/mydb-full --backup-image=full-mydb.mbi
    copy-back-and-apply-log

mysqlbackup --login-path=usrbackup --socket=/var/lib/mysql/mysql.sock --incremental
    --backup-dir=/backups/mydb-inc01 --backup-image=inc-mydb.mbi
    copy-back-and-apply-log

mysqlbackup --login-path=usrbackup --socket=/var/lib/mysql/mysql.sock --incremental 
    --backup-dir=/backups/mydb-inc02 --backup-image=inc-mydb.mbi
    copy-back-and-apply-log 

When it deletes any other databases, this includes mysql, and information_schema, rendering the server completely unusable.

Is there something I am doing wrong?

  • That's worth a Serious error to bugs.mysql.com – Rick James May 25 '17 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.