Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

XtraBackup Manager - Backup Strategies and Materialized Snapshots

Hi Folks,

I have now committed the changes for the new Backup Strategies feature to trunk! In addition, I'm pretty much finished on implementing the majority of the Materialized Snapshot feature/option.

So let me talk a little bit about those features...

Enabling the "maintain_materialized_copy" feature for a backup will mean that while XBM takes FULL backups and INCREMENTAL backups and keeps them separately, it will maintain an additional directory that contains a complete backup with the latest deltas applied to it.

We only keep a materialized copy of the latest backup, not for each and every possible restore point as that would take up more space than most people can afford ( or at least more than we can afford ).

One benefit here is that if some problem should occur applying the latest set of deltas, you do not risk completely voiding your backup, you can always restore from the seed and deltas that are stored separately, up until the snapshot before the problem, and then perhaps use binary logs to roll forward from there.

Using materialized snapshots also means that you are constantly testing the process of actually applying your deltas, so if something was wrong with that step, you will learn about it quickly, not later on when you are desperately trying to restore from your backups.

Another great thing about materialized snapshots is that there is no waiting around for multiple sets of deltas to apply in order to restore your latest backup. Simply copy the materialized snapshot to the restore location and fire up MySQL -- InnoDB will of course take the usual time to do final crash recovery steps, but it should be much faster to get back up and running.

Now a little on Backup Strategies. There are three major strategies available and I'll talk a little on each below.

Full Backup Only

This is fairly cut and dry. XtraBackup Manager only takes full backups. You can configure how many is the maximum number of these snapshots to keep. After each backup is complete, the retention policy will be applied and any number of backups beyond the maximum will be deleted, counting from the latest to oldest. There is no need or option for materialized snapshots, since in this case all backups are always fully materialized.

Continuous Incremental

Take a full backup (aka seed) first and then after that only take incremental backups. The seed and deltas are all stored separately. Again you can configure the maximum number of snapshots to maintain (retention policy), however, in this case, we apply the oldest set of deltas onto the seed and repeat that process until we have no more than the maximum number of snapshots configured. The retention policy is always applied after a successful backup.

Rotating Groups


This is the most complex backup strategy, but it allows a great deal of flexibility. The concept here is that we consider a backup group as a full backup with corresponding sets of deltas. You may configure the number of groups you keep, as well as when new groups should be created in a variety of ways.

The benefit of keeping more than one group, is that should one seed or set of deltas be bad or broken in any way, you have another option -- in addition, you may more frequently take full backups, which means that the number of sets of deltas to be applied to reach a particular restore point will be less.

When using rotating groups, you must select a rotation method - there are two options: DAY_OF_WEEK and AFTER_SNAPSHOT_COUNT.

With the snapshot count rotation method, the first backup will be a FULL backup, after which incremental backups are taken until a total number of backups equals the number you configure. The next backup after that will be a full backup in a new group and the backups after that will be incrementals, based on the newly taken full backup. This cycle just repeats, however, retention is controlled based on the maximum number of groups to maintain. Once a new group is created beyond the maximum allowed, the oldest group will be removed until there are no more than the maximum.

With day of week, you simply select which day(s) of week you would like your FULL backups to be taken on -- XBM will "rotate" on the first snapshot taken for that day. "Rotate" essentially means it will create a new group with its own full backup and then proceed to take deltas until a "rotate_day_of_week" is encountered again. You can also configure a maximum number of deltas allowed, in case for some reason the backup is never running on the day of the week that it should. In that case it will not backup - You may configure if you consider that a fatal error that should be alerted, or if it should just silently do nothing/skip that backup.

The benefit of using day of week over snapshot count is that it allows you to firmly control which days your full backups should happen on.

Eg. If I deploy backups on a new host and I configure to take full backups on Sunday. I might kick off the first backup on a Wednesday -- in this case because it is the first backup ever for the host, it will take a full backup and then continue to take deltas until Sunday, when it will take a full backup again and then continue to rotate every Sunday from then on.

Again for day of week rotation, retention is controlled based on the maximum number of groups to maintain. Once a new group is created beyond the maximum allowed, the oldest group will be removed until there are no more than the maximum.

Now with all of these complex behaviours and options to configure and close to zero up-to-date documentation, I am about the only person who could make use of XBM, so the next steps are a better configuration tool/interface and documentation.

In addition, I'm also planning to add support for backing up the MySQL binary logs.

Once again, if you're interested in contributing in any way or just checking out the project, it is hosted on Google Code here:

http://code.google.com/p/xtrabackup-manager/

Comments and feedback are welcome!

Cheers,
Lachlan

PlanetMySQL Voting: Vote UP / Vote DOWN
Source Article
Comments
0
Be the first to comment

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect
avatar
Tags: snapshot feature, crash recovery, copy feature, recovery steps, deltas, backup strategies, retention policy, incremental backups, innodb, hi folks, snapshots, ma
Backup/Restore: Coordinating Cassandra Nodetool Snapshots with Amazon EBS Snapshots?
Jun 22, 2011
I have a couple of questions regarding the coordination of Cassandra nodetool snapshots with Amazon EBS snapshots as part of a Cassandra backup/restore strategy. Background: I have a cluster running in EC2. Its nodes are configured like so: *…

backup strategies
Mar 1, 2011
Hi Everyone, One of the fears I've always had with DFS and building up these large data stores, like Cassandra, is what to do in the event of an unexpected fault or failure. This happened with gmail yesterday ...…

Production Backup Strategies
May 13, 2011
Hey All, I'm sizing up some database options for a fairly ambitious app I'm building out for a client of mine. I've read a good amount of the available docs and have toyed around with Riak enough to know that it's one of my finalists (one of two,…

Problems with Backup Manager
Nov 22, 2010
Hi all, We are trying to setup session replication using tomcat as webserver. We have two nodes communicating together via multicast address groups using asynchronous communication channel. As an underlying platform, we are using liferay…

DO NOT REPLY New: backup manager reports too few current sessions
Jun 8, 2010
https://issues.apache.org/bugzilla/show_bug.cgi?id=49407 Summary: backup manager reports too few current sessions Product: Tomcat 6 Version: 6.0.20 Platform: All OS/Version: All …

Derby query optimizations / (materialized) Views and Queries
Jun 13, 2011
I have a Derby table (T) with 10^7 records. This table has 5 columns. I have defined a Derby view (V) on one of those columns. To produce (V) all of (T) needs to be scanned. There are about 2000 records that the view (V) contains. Now, I "cross"…

svn commit: r1084103 - in /tomcat/trunk/webapps: host-manager/401.jsp host-manager/403.jsp manager/4
Mar 22, 2011
Author: markt Date: Tue Mar 22 08:46:00 2011 New Revision: 1084103 URL: http://svn.apache.org/viewvc?rev=1084103&view=rev Log: Remove unnecessary code that makes switching to other authentication methods difficult. Modified: …

Created: (HDFS-1411) The startup command of the Backup Node is "bin/hdfs namenode -backup"
Sep 19, 2010
The startup command of the Backup Node is "bin/hdfs namenode -backup"

Release Apache Sling JCR Access Manager 2.1.0, JCR User Manager 2.1.0, JCR WebDAV support 2.1.0, and
Nov 3, 2010
Hi, We solved 22 issues in these releases: https://issues.apache.org/jira/browse/SLING/fixforversion/12314772 https://issues.apache.org/jira/browse/SLING/fixforversion/12314774 https://issues.apache.org/jira/browse/SLING/fixforversion/12314773…

Apache Sling JCR Access Manager 2.1.0, JCR User Manager 2.1.0, JCR WebDAV support 2.1.0, and JCR Dav
Nov 10, 2010
The Apache Sling team is pleased to announce the release of Apache Sling JCR Jackrabbit Access Manager 2.1.0, Apache Sling JCR Jackrabbit User Manager 2.1.0, Apache Sling JCR WebDAV support 2.1.0, and Apache Sling JCR DavEX support 1.0.0 Apache…