Showing entries 31 to 40 of 260
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Backup (reset)
How to backup MySQL to your own storage servers

When a user signs up for online backup service for MySQL we allocate two gigabytes of free disk space in our storage. It’s convenient for small databases. We manage the storage, no additional hardware is needed from the user. What if the database is large enough so 2 gigabytes is not enough?

TwinDB allows to backup MySQL to your own storage servers. The storage will be visible in TwinDB console, the dispatcher will set it as a destination server when scheduling backup jobs and will enforce retention policy.

But the biggest benefit of having your own storage server in TwinDB is that backup copies never leave your data center. The agents are still managed by TwinDB dispatcher, but when XtraBackup streams a backup copy it’s encrypted and piped over ssh to your server. That increases security of the solution – your data flow is under your control. Besides, no large amounts of data are transferred to the cloud.

The …

[Read more]
Creating and Restoring Database Backups With mysqldump and MySQL Enterprise Backup – Part 2 of 2

In part one of this post, I gave you a couple examples of how to backup your MySQL databases using mysqldump. In part two, I will show you how to use the MySQL Enterprise Backup (MEB) to create a full and partial backup.

MySQL Enterprise Backup provides enterprise-grade backup and recovery for MySQL. It delivers hot, online, non-blocking backups on multiple platforms including Linux, Windows, Mac & Solaris. To learn more, you may download a …

[Read more]
Creating and Restoring Database Backups With mysqldump and MySQL Enterprise Backup – Part 1 of 2

Part 1 of 2: (part two)
If you have used MySQL for a while, you have probably used mysqldump to backup your database. In part one of this blog, I am going to show you how to create a simple full and partial backup using mysqldump. In part two, I will show you how to use MySQL Enterprise Backup (which is the successor to the InnoDB Hot Backup product). MySQL …

[Read more]
Encrypting MySQL Backups

Encryption is important component of secure environments. While being intangible property security doesn’t get enough attention when it comes to describing various systems. “Encryption support” is often the most of details what you can get asking how secure the system is. Other important details are often omitted, but the devil in details as we know. In this post I will describe how we secure backup copies in TwinDB.

See the picture. This is what happens when encryption is used incorrectly. The encryption algorithm can be perfect, but poor choice of the mode results in a quite readable encrypted image. This mode is called “Electronic Code Book”, avoid it at all means.

Another bright example of improper encryption use was illustrated in Venona project.

[Read more]
Building XtraBackup for Mac OS

Percona XtraBackup is free and open source backup tool for MySQL. Percona distributes XtraBackup via package repositories for RedHat and Debian.

Unfortunately there are no packages for Mac OS. In this post I will describe how to build XtraBackup for Mac OS.


To build and use XtraBackup on Mac OS you need to install some additional packages. I will use MacPorts to install the dependencies.

# port install cmake p5.16-dbd-mysql

Building XtraBackup for Mac OS

Download the source code from …

[Read more]
How to setup MySQL incremental backup

Incremental backups in MySQL were always a tricky exercise. Logical backup tools like mysqldump or mydumper don’t support incremental backups, although it’s possible to emulate them with binary logs. And with snapshot-based backup tools it’s close to impossible to take incremental copies.

Percona’s XtraBackup does support incremental backups, but you have to understand well how it works under the hood and be familiar with command line options. That’s not so easy and it’s getting worse when it comes to restoring the database from an incremental copy. Some shops even ditch incremental backups due to complexity in scripting backup and restore procedures.

With TwinDB incremental backups are easy. In this post I will show how to configure MySQL incremental backups for a replication …

[Read more]
MySQL, Percona, MariaDB long running processes clean up one liner

There are tools like pt-kill from the percona tool kit that may print/kill the long running transactions at MariaDB, MySQL or at Percona data instances, but a lot of backup scripts are just some simple bash lines.
So checking for long running transactions before the backup to be executed seems to be a step that is missed a lot.

Here is one line that might be just added in every bash script before the backup to be executed
Variant 1. Just log all the processlist entries and calculate which ones were running longer than TIMELIMIT:

$ export TIMELIMIT=70 && echo "$(date) : check for long runnig queries start:" >> /tmp/ && mysql -BN -e 'show processlist;' | tee -a /tmp/ | awk -vlongtime=${TIMELIMIT} '($6>longtime){print "kill "$1";"}' | tee -a /tmp/

Variant 2: Log all the processlist, calculate the calculate which processes …

[Read more]
Renaming tables with MySQL Enterprise Backup 3.12.0


MySQL Enterprise Backup 3.12.0 (MEB) introduces a new feature for restoring an InnoDB table from a backup. Now it is possible to rename the table during restore. This is useful when the user wants to restore a table from a backup without overwriting the existing version of the table in the database.

The following example illustrates how the renaming feature could be used.  Suppose that the DBA has deleted three rows from a table T1 by mistake and he now wishes to get them back from a backup. He wants to leave the database online and to restore the 3 deleted rows from a TTS backup (a backup created with the --use-tts option) that contains the table T1.  He can do this with this feature in three steps:

  1. He restores with MEB the table T1 from a TTS backup renaming it to T2.

  2. He uses MySQL client to issue SQL statements to …
[Read more]
Operationalizing TokuDB

In my previous post, I talked about implementing multi-threaded replication (MTR) using Percona Server 5.6. The server pairs that are utilizing MTR are also exclusively using the TokuDB storage engine.

I find TokuDB to be a fascinating engine. I can tell I will need to re-watch our Dbhangops session where Tim Callaghan talked about the differences between B-Tree and Fractal Tree indexes. There’s also a session on how compression works in …

[Read more]
MySQL Backup Strategy – Slides

Hi there, it’s been a few months since Percona Live London has finished, but I managed just now to get sometime to post the slides from my presentation about backups. Please, take a look and feel free to comment.

Pdf Version

[Read more]
Showing entries 31 to 40 of 260
« 10 Newer Entries | 10 Older Entries »