1. TwinDB Backup Tool Release 2.15.7

TwinDB Backup Tool Release 2.15.7

Some time ago, our team released a new version of TwinDB Backup Tool that contains minor fixed and some major improvements. In this article I want to highlight major features in this release.

Status refactoring

The tool stores backups metadata in a JSON file that I will refer further as the status. The status is stored on a destination along with backup copies and it contains necessary information to restore from incremental copies, for example. Sometimes during the network transfer the status file had been silently corrupt. That led to bugs like #87. In the 2.15.7  release we added a status integrity check. From now on the status is protected by a checksum. It helps to identify the status integrity and inform a user if something goes wrong. In future releases we plan to enforce stricter consistency checks, add crash recovery, and ensure the status is updated by an atomic write.

Xtrabackup tool included in twindb-backup package

TwinDB Backup Tool uses Xtrabackup for MySQL backups. It was declared as an external dependency in our twindb-backup package. There was a problem though. The percona-xtrabackup package installs version 2.3 on CentOS and Debian/Ubuntu, however we needed the 2.4+ version because it supports MySQL 5.7. The 2.4 version comes in a package percona-xtrabackup-24 which conflicts with percona-xtrabackup. Same time, some other packages (for example Percona XtraDB Cluster) depend on the old percona-xtrabackup, so it was kind of impossible to cleanly install everything.

Another unnecessary step was a requirement to have two repos – TwinDB’s and Percona’s – to install twindb-backup. That wasn’t very much user friendly and we fixed that by shipping Percona Xtrabackup with the twindb-backup package.

TwinDB Backup Tool is built using Omnibus. The idea was to build and include Xtrabackup into the Omnibus package and declare Xtrabackup’s dependencies as the external dependencies of the Omnibus package. The xtrabackup software is available in our omnibus-software repository:

Please note we build Xtrabackup in one thread – sometimes there were intermittent compiler errors with default settings.
The next step is to add xtrabackup as a dependency of the twindb-backup package:

While this approach solved the problems there is a drawback, too. The package obviously got bigger, now it’s 180MB and when installed TwinDB Backup uses almost a gigabyte of disk space in /opt. It is definitely something to consider when provision a backup server.

Previous Post Next Post