Database backup and restore on console

Your software
My Mautic version is: 5.1.0
My PHP version is: 8.2.20
My Database type and version is: mariadb:10.5.18

Your problem
I want to setup simple database backup and restore tasks in my deployer script. I want them to automatically read the mautic database configuration. Do i have to use the third-party console command sidus:database:mysqldump of the SidusDatabaseMaintenanceBundle and the built-in doctrine:database:import command to do so?