Hello MariaDB Team,

I would like to contribute pre-freeze and post-thaw scripts that utilize 
MariaDB's BACKUP STAGE commands to enable consistent volume-based backups with 
solutions like Veeam and similar backup products.

Background:
Currently, many organizations use storage-level or volume-based backup 
solutions (Veeam, Commvault, etc.) for their database servers. To ensure 
crash-consistent or application-consistent backups of MariaDB, these tools need 
proper pre-freeze and post-thaw hooks that interact with the database engine.

What I'm offering:
Scripts that implement:
* Pre-freeze: Execute BACKUP STAGE START → BACKUP STAGE BLOCK_COMMIT and sync 
to ensure a consistent state before the snapshot
* Post-thaw: Execute BACKUP STAGE END to release locks after the snapshot 
completes
* Timout, Error handling and logging

Technical Implementation:
It required significant effort to develop these scripts in a way that ensures 
the same MariaDB client session is maintained across both the pre-freeze and 
post-thaw scripts. This is essential because the BACKUP STAGE commands are 
session-based.

Key Advantage:
The major benefit of using BACKUP STAGE over traditional methods (like FLUSH 
TABLES WITH READ LOCK) is that:
*  No read locks are imposed on the database
*  The write lock is extremely brief (only during BLOCK_COMMIT)
*  This minimizes impact on production workloads during backup operations
*  No extra disk space or I/O load required on the database server (unlike 
mariadb-backup/mariabackup tool)

I believe this could be valuable for many MariaDB users who rely on enterprise 
backup solutions and would benefit from scripts for this purpose.
Would the MariaDB project be interested in hosting/maintaining such scripts?

I have created a pull request: https://github.com/MariaDB/server/pull/4705

Looking forward to your feedback!

Notice: I've started a discussion in Zulip before and decided to get a greater 
audience now: 
https://mariadb.zulipchat.com/#narrow/channel/118759-general/topic/Pre-freeze.2FPost-thaw.20Scripts.20for.20Volume-based.20Backups/with/575995563

Best regards,
Gerd Aschbrenner

Gerd Aschbrenner
DevOps Engineer

ARZ Haan AG | Cecilienallee 7 | 40474 Düsseldorf
 | Mail: [email protected]

Amtsgericht Wuppertal: HRB 12670 | Vorsitzender des Aufsichtsrates: Thomas Preis
Vorstand: Dr. Philipp Siebelt (Sprecher), David Oruzgani

_______________________________________________
discuss mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to