Skip to content

Add database backup drivers: mariadb-dump, mysqlpump, mydumper, xtrabackup - #2

Merged
LazuliKao merged 6 commits into
mainfrom
copilot/add-backup-methods-support
Nov 26, 2025
Merged

Add database backup drivers: mariadb-dump, mysqlpump, mydumper, xtrabackup#2
LazuliKao merged 6 commits into
mainfrom
copilot/add-backup-methods-support

Conversation

Copilot AI commented Nov 26, 2025

Copy link
Copy Markdown
  • Create mariadb_dump.go - MariaDB dump driver using mariadb-dump command
  • Create mariadb_dump_test.go - Tests for MariaDB dump driver
  • Create mysqlpump.go - MySQL pump driver using mysqlpump command
  • Create mysqlpump_test.go - Tests for MySQL pump driver
  • Create mydumper.go - MyDumper driver using mydumper command
  • Create mydumper_test.go - Tests for MyDumper driver
  • Create xtrabackup.go - XtraBackup driver using xtrabackup command
  • Create xtrabackup_test.go - Tests for XtraBackup driver
  • Update base.go to register new database drivers
  • Update Dockerfile to add required dependencies (mydumper, xtrabackup)
  • Run tests to verify all new drivers work correctly
  • Request code review
  • Address code review feedback (fix mydumper exclude tables regex issue)
  • Run CodeQL security scan
  • Refactor Dockerfile to use multi-stage builds for smaller final image
  • Add documentation for new database drivers (docs/database-drivers.md)
Original prompt

support more backup method (each one as standalone database driver):
mariadb-dump
mysqlpump
mydumper: https://github.com/mydumper/mydumper
XtraBackup

and add required deps in Dockerfile


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 26, 2025
Copilot AI and others added 2 commits November 26, 2025 12:40
…trabackup)

Co-authored-by: LazuliKao <46601807+LazuliKao@users.noreply.github.com>
Co-authored-by: LazuliKao <46601807+LazuliKao@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for additional backup methods in standalone drivers Add database backup drivers: mariadb-dump, mysqlpump, mydumper, xtrabackup Nov 26, 2025
Copilot AI requested a review from LazuliKao November 26, 2025 12:45
@LazuliKao

Copy link
Copy Markdown
Owner

@copilot make Dockerfile uses stages for building

Co-authored-by: LazuliKao <46601807+LazuliKao@users.noreply.github.com>

Copilot AI commented Nov 26, 2025

Copy link
Copy Markdown
Author

@copilot make Dockerfile uses stages for building

Refactored the Dockerfile to use multi-stage builds in commit 966dab8. Now uses 6 stages:

  1. mydumper-builder - Compiles mydumper from source
  2. xtrabackup-downloader - Downloads XtraBackup
  3. sqlpackage-downloader - Downloads sqlpackage
  4. influx-downloader - Downloads influx CLI
  5. etcd-downloader - Downloads etcdctl
  6. Final runtime stage - Contains only runtime dependencies

This keeps build tools (cmake, make, g++, etc.) out of the final image.

@LazuliKao

Copy link
Copy Markdown
Owner

@copilot add documents for using these new driver

Co-authored-by: LazuliKao <46601807+LazuliKao@users.noreply.github.com>

Copilot AI commented Nov 26, 2025

Copy link
Copy Markdown
Author

@copilot add documents for using these new driver

Added documentation in commit bf103a0:

  • Created docs/database-drivers.md with detailed configuration for all 4 new drivers
  • Updated README.md to list the new drivers and link to the documentation

The docs include configuration examples, options tables, usage notes, and a comparison table.

@LazuliKao
LazuliKao merged commit 2f55ac6 into main Nov 26, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants