Skip to main content

Posts

Showing posts with the label XtraBackup

A difficult XtraBackup restore

There was one MySQL server with a Adaptec Raid controller and 4 disks. One of the disks was having media errors and caused the whole SCSI bus to become unavailable. This resulted in a corrupted InnoDB table. Luckily we did have backups. A full backup and incrementals. So to restore the backups I installed XtraBackup and MySQL 5.5 on another server. Then the first step was to 'prepare' the backup. This worked okay for the full backup (redo only). The second step to add the incremantals failed for the first incremental. This was easily resolved by specifying the full paths instead of relative paths. Then the backup was fully prepared using the redo logs and undo logs. As XtraBackup doesn't backup your my.cnf we copied the my.cnf from another server and adjusted it for this server. The my.cnf in your backup only contains everything needed for a restore, and some of those settings are Percona Server specific and will result in an error when used with MySQL. So f...

Backup your sandbox with XtraBackup

Today I tried to make incremental backups of a MariaDB instance in a MySQL sandbox with Percona XtraBackup. I used the recently released XtraBackup 2.0. And of course there is documentation about making incremental backups.  MySQL sandbox makes it easy to run many different MySQL versions on one machine. It does this by changing the port number, data directory, UNIX socket location and a whole lot more. So I first started with a full backup and after that I used that backup as a base for the incremental backups. To do that I had to specify the port number which is 5522 and the username and password for the msandbox account. As MySQL uses a UNIX socket instead of a TCP connection if the hostname is localhost I specified 127.0.0.1 as hostname to force a TCP connection. That worked! Then I created the incremental backup by using the --incremental option and the --incremental-basedir option to specify the location of the full backup. That also worked! Then I tried to make a ba...