contrib add support for mariadb 11+#2215
Merged
BareosBot merged 26 commits intobareos:masterfrom Apr 17, 2025
Merged
Conversation
94b004a to
590d19f
Compare
sebsura
requested changes
Mar 28, 2025
Contributor
sebsura
left a comment
There was a problem hiding this comment.
I get these warnings during the mariadb tests when executing testrunner-default
shutdown Mariadbd server 2025-03-28 7:31:09 0 [Warning] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some options may be missing from the help text
contrib/fd-plugins/bareos_tasks/mariadb/BareosFdMariaDBClass.py
Outdated
Show resolved
Hide resolved
.../py3plug-fd-contrib-mariadb-dump/etc/bareos/bareos-dir.d/fileset/bareos-mariadb-dump.conf.in
Show resolved
Hide resolved
...ests/tests/py3plug-fd-contrib-mariadb-dump/etc/bareos/bareos-dir.d/job/BackupCatalog.conf.in
Outdated
Show resolved
Hide resolved
systemtests/tests/py3plug-fd-contrib-mariadb-dump/etc/bareos/bareos-dir.d/pool/Scratch.conf
Outdated
Show resolved
Hide resolved
systemtests/tests/py3plug-fd-contrib-mariadb-dump/mariadbdefaults.in
Outdated
Show resolved
Hide resolved
systemtests/tests/py3plug-fd-contrib-mariadb-dump/mariadbdefaults.in
Outdated
Show resolved
Hide resolved
bruno-at-bareos
commented
Apr 1, 2025
bruno-at-bareos
commented
Apr 1, 2025
bruno-at-bareos
commented
Apr 1, 2025
docs/manuals/source/Appendix/Howtos/BackupOfThirdPartyDatabases.rst.inc
Outdated
Show resolved
Hide resolved
bruno-at-bareos
commented
Apr 1, 2025
docs/manuals/source/Appendix/Howtos/BackupOfThirdPartyDatabases.rst.inc
Outdated
Show resolved
Hide resolved
bruno-at-bareos
commented
Apr 1, 2025
bruno-at-bareos
commented
Apr 1, 2025
systemtests/tests/py3plug-fd-contrib-bareos_tasks_mariadb/CMakeLists.txt
Show resolved
Hide resolved
d12f0a7 to
abbf631
Compare
1f05cf2 to
241de40
Compare
sebsura
approved these changes
Apr 16, 2025
241de40 to
1b1b969
Compare
3 tasks
- add dedicated mariadb.sh script - replace mysql.sh in BareosSystemtestFunctions.cmake - cmake use if to filter out db_install_script if it is a link - cmake add MARIADB_DUMP_BINARY & MYSQL_DUMP_BINARY vars to be used in contrib - contrib add switch for conditional build depending on MARIADB or MYSQL
- simplify functions name in mariadb.sh helper script - adapt mariabackup plugin systemtest to new mariadb helper functions - fix typo in plugin description - introduce new defaults-file in testrunner: mariadbdefaults.in - adapt copyright year
mariadb-dump aims to replace obsolete mysql on systems with MariaDB binaries, due to the deprecated aliases of `mysql*` commands - use unify plugin way with new name - add debug init message - add python version check - use fstring everywhere - systemtests: create new py3plug-fd-contrib-mariadb-dump - update documentation - update module description - fix port aliases in systemtest configuration - cmake: improve testing and messages Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
This contrib module help to run task on mariadb cluster. - add systemtests fd-contrib_bareos_task_mariadb - split test to have setup,cleanup,default - simplify number of tests, incremental can be skipped dump operation are always full
Install unconditionally mariadb and mysql. Only the systemtests has to be filtered depending on the availability of the binaries.
- remove unused pools definitions - use run_bconsole instead run_bareos - add incremental data in the db and rerun a full job - add more messages during tests
- remove unused pools definitions - use run_bconsole instead run_bareos - add incremental data in the db and rerun a full job - add more messages during tests
- remove unused pools,filesets definitions - run only full backup - use run_bconsole instead run_bareos - add incremental data in the db and rerun a full job - use Full pool in restore job
Adapt python module to newer syntax compatible with grpc testing.
- add new section about MariaDB backup in section `Backup Of Third Party Databases` - move MySQL in last, add legacy terms - renew indexes Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Co-authored-by: Sebastian Sura <124262655+sebsura@users.noreply.github.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- add comment to specify why it is always a full - make log naming consistent
- Review and rework ThirdPartyDatabases section for mariad-dump plugin, adding missing options and example how to use them. - Empty almost all content of README and add a link to corresponding documentation section. - Fix typo in plugin comment
- add note in headers about dump done in memory - import shlex and use shlex.split for command line calls - move `--databases` default flag in defaults dumpoptions - retrieve and format db size for statp.st_size - enclose Popen call in try/except block - improve and format Job and Debug messages
- fix issue#2148 take into account usage of mycnf parameter - improve a little debug messages - simplify systemtest fileset
- use shlex.split also for getting size db command - testrunner-default stop bareos & mariadb in case of errors
c8bf237 to
ba3b950
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to introduce support of mariadb pure executable instead
of mysql aliases (which are now all deprecated)
MySQL support is untouched, so systems running real mysql binaries
should work out as before.
We introduce a new systemtests helper mariadb.sh which is used instead
of mysql.sh.
cmake variables are not differenciated between
MYSQL_andMARIADB_this allow to enable disable systemtests depending of the available
binaries.
mariabackup plugin is adapted to new helper functions.
Needs to be checked during review:
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests