restore

Restore single MySQL table from Xtrabackup (video demo)

In this blog we will create MySQL backup and then restore single table from Percona Xtrabackup without doing full restore. This post is basically a work-log in response to a feedback on my previous blog about MySQL Interview with ChatGPT. Here is a video recording of the steps described below for restoring single table from xtrabackup. Create a compressed MySQL backup using Xtrabackup xtrabackup –backup –compress –compress-threads=8 –target-dir=/root/backupdir Output in backup directory [root@ip-172-31-83-17 ~]# ls -lhtr /root/backupdirtotal 3.1M-rw-r—–. 1 root root 164K Dec 14 17:11 ibdata1.qpdrwxr-x—. 2 root root 31 Dec 14 17:11 sysdrwxr-x—. 2 root root 23 Dec 14...

Restore / Recover dropped MySQL database from binary logs

In this post I will share a recovery scenario of a MySQL database restore from the binary logs. Recently someone accidentally dropped an important MySQL database and the backup was not present! As we know the the binary log contains DMLs to table data and that’s where our hope lies. Luckily the binary log retention period (expire_logs_days) was set to 30 days and the CREATE DATABASE was still present in the binary logs. Thus this restore of the dropped MySQL database can be done from extracting respective DMLs point-in-time. Here we will play the binary logs against a temporary MySQL...

xtrabackup_51: not found & no ‘mysqld’ group in MySQL options

Recently I happen to setup a new MySQL instance with my tools – a standard MySQL 5.1+, xtrabackup setup and last-hotbackup.tar.gz. To restore from the backup we used xtrabackup binaries and ran into issues following standard commands (assuming no changes): To prepare the backup I used apply-log as follows: $] innobackupex-1.5.1 –defaults-file=/usr/local/mysql/data/backup-my.cnf –apply-log  /usr/local/mysql/data –ibbackup xtrabackup_51