· Aug 5, 2018

How to run Backup with Sharding

In a single server environment, it is rather easy to create a transaction consistent backup.

You find (or force a specific point in time with no open transactions.
Freeze your server, take a snapshot and you are done.

With Sharding your DB is distributed across several server instances.
For high availability situations, you may run synch or async Mirrors.
But this doesn't solve the problem to generate a transaction consistent Backup.

I'd like to get your ideas on how this could be achieved as I see 3 important factors:
- no pending transactions
- all changes written to DB
- all across all Sharding Servers

Discussion (3)1
Log in or sign up to continue

Hi Robert,

in 2018.2, we're introducing a feature called "coordinated backup", which basically allows adding a checkpoint in the journal files of all participating instances so you can roll them back to a synchronized state. We were just working on the docs for that feature the other week and it's four pages if you'd want the comprehensive answer to your question, so this is just a simplified version :-)

Please note that we currently do not support cross-shard transactions on sharded tables. It's not a common requirement for the types of use cases our sharding implementation was designed for (typically more analytical queries), but we're happy to discuss specific scenarios in the context of a POC to see what guarantees can be provided through appropriate application & schema design.