Cloning an on-premise DB using mariabackup instead of mysqldump (KB0752547, KB0563843)

KeithF
Kilo Contributor

Mellow greetings, fellow ServiceNow aficionados!

I'm the chief (and sole) wrangler for an on-premise/self-hosted SN stack (DEV/TEST/PROD) running on Rome with hopes of moving to San Diego Real Soon Now. Due to some shenanigans (longer story), I need to clone the current production instance (PROD) on to DEV and TEST to normalize the environments. I've been provided two KB articles (listed in title) but procedures are written for either MySQL or Oracle - and when we set up our instances (Kingston), we installed MariaDB 10 on the DB host. The backup/restore utility for MariaDB (mariabackup) is similar-yet-different from the MySQL equivalent (mysqldump), and as a result TFA provided are not really useful. I'm in a strongly-isolated environment so "just grabbing a copy of the mysqldump package" will not work - I have no desire to get into a weeks-long slap-fight with Information Assurance on the pressing need and relative importance of things.

I freely admit that I'm not a DBA (nor do I play one on TV), so I'm pretty much left clueless at the prompt without fairly detailed instructions. I know a little bit of SQL, but not nearly enough to help sort this situation out. Can anyone come up with a workable version of KB0563843 that reflects a MariaDB environment? If we moved to MySQL as the stock engine at some point, is there a non-surgical no-heroics-required method to migrate from one to the other? I appreciate your time and any insights you can provide.

1 REPLY 1

Taran3
ServiceNow Employee
ServiceNow Employee

There are 2 steps of mysqldump:

1) Backup

2) Restore

 

There are 2 steps of mariabackup:

1) Backup

2) Restore

 

If you replace the lines for taking a backup, and restoring a backup to any new backup technology being used, that should work. You may also contact MariaDB for more information on the syntax of MariaDBbackup. Please note that mysqldump also works with MariaDB, it just takes more time as compared to Mariabackup. More details can be found at:
https://mariadb.com/kb/en/backup-and-restore-overview/