When discussing disaster recovery, it’s important to take your business’ continuity plan into consideration. Backup and recovery processes are a critical part of any application infrastructure.
A well-tested backup and recovery system can be the difference between a minor outage and the end of your business.
You will want to take three things into consideration when planning your disaster recovery strategy: recovery time objective, recovery point objective and risk mitigation.
Recovery time objective (RTO) is how long it takes to restore your backups. Recovery point objective (RPO) is what point in time you want to recover (in other words, how much data you can afford to lose after recovery). Finally, you need to understand what risks you are trying to mitigate. Risks to your data include (but are not limited to) bad actors, data corruption, user error, host failure and data center failure.
Schrödinger's Backup: "The condition of any backup is unknown until a restore is attempted"
So you're backing up your databases, but are you regularly checking that the backups are actually useable? Uphold will help you automatically test them by downloading the backup, decompressing, loading and then running programmatic tests against it that you define to make sure they really have what you need.
While you can use the database client to check the status of your cluster, the individual nodes and the health of replication, you may find it counterproductive to log into the client on each node to run these checks. Galera Cluster provides a notification script and interface for customization, allowing you to automate the monitoring process for your cluster.
One of our customers had a question related to the right value of Galera Cache size (gcache.size) in Galera Cluster for MySQL which I would like to share with you.
The question was: My maintenance window takes 4 hours for my 5TB DB. How can I avoid an SST ?!
Basically, having too small GCache size will lead to SST (Snapshot State Transfer) instead of IST (Incremental State Transfer), thus we can avoid the SST by setting the GCache to the appropriate value.
Back in the days when somebody said MySQL, there was only the MySQL. You could pick different versions (4.0, 4.1) but the vendor was the same. This changed around MySQL 5.0/5.1 when Percona decided to release their own flavour of MySQL - Percona Server. A bit later, MariaDB joined with MariaDB 5.1 and the fun (or confusion) increased. What version should I use? What is the difference between MySQL 5.1, Percona Server 5.1 and MariaDB 5.1? Which one is faster? Which one is more stable? Which one has superior functionality? With time, this got worse as more and more changes were introduced in each of flavours. This blog post will be our attempt to summarize the key features that differentiate them. We will also try to give you some suggestions about which flavour may be the best for a given type of project. Let’s get started.
In this post I will explain how to transfer a multi terabyte size database between two MySQL instances using mydumper, which is a logical backup and restore tool that works in parallel. I will also cover the case where you need to transfer only a subset of data.
Big tables are often problematic because of the amount of time needed to do mysqldump/restore which is single threaded. It is not uncommon for this type of process to take several days.
n a perfect world, one would upgrade databases one version at a time and not let them get too old. But our databases are where the “crown jewels” are. They must stay up 24×7. When performance is acceptable, it’s acceptable, and sometimes old versions stay around too long. We don’t live in a perfect world. This idea applies to so many things. There’s almost never a perfect data model. There is always some type of resource constraint be it storage, memory, CPU, IOPS, or just plain dollars.
I will bring this concept of not living in a perfect world into a discussion about upgrades.
Ideally there would be…
- …time to do two upgrades. One upgrade to 5.6, the other to 5.7. This is the way sane, normal people upgrade.
- …a lot of extra hardware. It sure would be nice to maybe combine a maintenance like this with a hardware refresh so that we could just have an entirely new MySQL 5.7 database shard, slap a MySQL 5.6 box in the middle as a relay, and once things are all caught up just do a VIP cutover to new machines.
The extra hardware idea I have actually worked with in the past. A client of a company I worked for just had a standalone 5.5 machine with no replicants. They were able to allocate two more servers, one to be a 5.6 relay and one new 5.7 machine that would serve as a final destination. Added bonus… At the end the 5.6 server would be upgraded and left in place for a redundant machine.
MyCLI is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.
echo -n foobar | openssl sha1 -binary | openssl sha1 -hex | sed 's/(stdin)= /*/' | tr '[:lower:]' '[:upper:]'
Help with moving from MySQL to MariaDB, features and compatibility