Array Performance and Data Protection
cancel
Showing results for 
Search instead for 
Did you mean: 

Script to Backup MySQL Database to Nimble

SOLVED
Go to solution
jmcgary103
Occasional Visitor

Script to Backup MySQL Database to Nimble

I need to stop and start MySQL database, take snapshots, and then restart My SQL database. Using Bash (RedHat Linux)

5 REPLIES
N/A

Re: Need help writing a script to backup MySQL database to Nimble.

Im sure you could do this with the PowerShell module...  although I haven't had the chance to use it yet. If it facilitates snapshotting (which it looks like it does), you could simply use PowerShell to call plink.exe and pass your MySQL service stop, take the snap, start MySQL.

N/A

Re: Need help writing a script to backup MySQL database to Nimble.

I'll be honest...  I'm extremely new to the Nimble community and not aware of CLI/API capabilities yet. If you can ssh from Linux directly to Nimble then that would obviously be your choice.

Forgot to add...   ping me offline at mike@runningohio.com if you need some help writing this. Both PowerShell and Bash.

Mike

rfenton4
Honored Contributor
Solution

Re: Need help writing a script to backup MySQL database to Nimble.

Hey Jeffery,

Check out the excellent script written by Tom Dau:

https://connect.nimblestorage.com/docs/DOC-1302

It specifically pertains to Oracle but the genesis of the operations is identical - Tom's script puts Oracle into and out  Archive logmode in order to get the consistency but you should be easily able to substitute that for the MySQL equivalent or the shutdown/restart of the service.

Cheers
Rich

jtmoree23
Advisor

Re: Script to Backup MySQL Database to Nimble

I wrote my own snapshot utility similar to the oracle one.  I already have custom backup scripts for mysql so I added this process to the same project.  The basic idea goes like this:

* process on DB server locks database

* forked process starts snapshot on nimble

* after snap DB tables are unlocked

https://sourceforge.net/projects/mysqlarchives/

I posted the code here.  Feel free to take a look.

rfenton4
Honored Contributor

Re: Script to Backup MySQL Database to Nimble

JT Moree - you should post that to the main forum as well - there is a nice promotion running for the community for tips, suggestions and scripts...