At 03:18 PM 9/17/01, Don Krause wrote:
That looks a little excessive.. <G>
Whats wrong with using mysql's own tools?
Basically, it's that all my problems look like nails. I'm a better
perl programmer than shell script writer, so I tend to use perl for
everything.
ie:
----Cut----
#!/bin/csh -f
cd /export/mysqlbackup;
echo "show databases;" | /usr/local/bin/mysql -uadmin -padminpassword
|
/usr/bin/grep -v Database > dblist;
foreach db(`cat dblist`)
/usr/local/bin/mysqldump -e --add-drop-table -l -uadmin
-padminpassword
$db > $db`date +%b%d%Y`.dump;
end;
/usr/bin/find . -mtime +7 -name "*.dump" -exec rm -f {} \;
----End----
That, my friend, is a beautiful thing.
Todd