views:

24

answers:

1

I would like to create a backup script (.sh that I can cron) that backs up the following databases:

someotherdatabase
database1
database2
database3
database4
database5
database6
...
database9999

I know "someotherdatabase" will always have that name so that can be backed up easily. The other databases have an incremental number but I don't know when backing up how many those will be, so that has to be automatic (best with a wildcard database* but I'm not sure if that's possible)

these will be live databases, so I'm not sure if I have to enable some sort of locking on the databases when backing them up?

So in short, what's the best way to backup this database pattern so that they can easily be restored just by importing them when something goes wrong?

A: 

This might help.

Cheers!

Edit: here's more alternatives: 10 Ways to Automatically & Manually Backup MySQL Database

Hal