Comments - How to include "mariadb-dump" in the build? Best practices for backup?

1 month ago Vladislav Vaintroub

Not, not exactly what I meant.

I mean, if I do the same as you do, then after then cmake --build , there is a client/mariadb-dump already, and if I install with

cmake --install . --prefix my_prefix

then run

my_prefix/bin/mariadb-dump --help

it does what it should do, namely, output usage and various variables it accepts.

I'm saying it works for me, because I just ran this sequence. I could recommend passing -j<number_of_cpus> to the cmake --build , to shorten the build time.

 
1 month ago John Doe

Ahaaaaaaa! I understand it now!

The "mariadb-dump" is already installed. On my system, MariaDB is installed to "/usr/local/mysql".

And if i run

/usr/local/mysql/bin/mariadb-dump

This will start the "mariadb-dump". I did not know it's inside the installation directory!

So it looks like I do not need to reinstall anything, which is nice.

By the way, I just wonder: If I want to completely uninstall/reinstall MariaDB in the future after building manually, what is the best way?

I just do:

<<code>> sudo rm -rf /usr/local/mysql <</code>

Or I need to do something else, to make a complete uninstall?

Thank you so much!

 
1 month ago Vladislav Vaintroub

I think your "rm -rf" should be fine. cmake --install did not create anything outside of that directory.

You need to decide where you'll create data directory with mariadb-install-db, and then decide whether to remove or retain when you uninstall like that, there is no automatisms for that, with "cmake --install"

 
1 month ago John Doe

Thank you so much Vladislav, you helped me a lot! I was trying to figure out for 8 hours how to include "mariadb-dump" in the installation. It turns out I already had it - haha!

Now I will go continue working on my script to automate database backups with it. I will also try "mariabackup" and compare it, but I think it will be too large for my email attachment.

Thanks a lot and have a nice day!

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.