Right linux client SQL backup

I’m newbie in linux. Plz explain to me how backup mariadb properly?

I had set up linux client with .sh from server, enabled mariadb backup by documentation https://www.urbackup.org/backup_mysql.html, so i have mariadbdump.sql file.

But i had 2 sql bases on server, how i can restore base1 or base2 from mariadbdump.sql separately?

Is there any way to backup sql bases separately?

TY in advance.

You’d have to look at + extend the backup scripts.

/usr/local/share/urbackup/scripts/list lists the scripts to run.

You can extend this list by adding another at /usr/local/etc/urbackup/scripts/list. Then list scripts like /usr/local/share/urbackup/scripts/mariadbdump there that output the specific databases.

outputname should be the first parameter, so you could use the same script for all databases if you know a bit of bash/other suitable language.

It’s interested, I didn’t know that I can add new backup scripts.

For restore only base1 use:

mysql --one-database database_name < all_databases.sql