- To: "slug" <slug@xxxxxxxxxxx>
- Subject: [SLUG] MySQL dumps per database, how 2 script ?
- From: "Voytek" <lists@xxxxxxxxxx>
- Date: Sat, 4 Sep 2004 00:02:35 +1000 (EST)
- User-agent: SquirrelMail/1.5.0
I have a script that dumps all MySQL databases along these lines:
------
#!/bin/sh
set $(date)
# create sql dump of databases:
rm "/backup/database/koala_$3.sql.gz"
mysqldump -u backup --add-drop-table -F -A > "/backup
gzip "/backup/database/koala_$3.sql"
------
that works quite well, but, it's a little unwieldy to find invidual
databases amogst the 400,000 lines of dump, so I'd like to dump individual
databases dumped one at at a time
I can dump names of all databases with something like
'mysqlshow'
but not sure how to parse the 'borders' and feed it back to the mysqldump
------
+-------------------+
| Databases |
+-------------------+
| atom |
| commodore |
------
perhaps some has such a script already ?
--
Voytek