[CLUG] script
Robert Heffernan
bobheff at esatclear.ie
Fri Jul 20 00:24:01 IST 2001
hi guys,
I'm trying to write a script to backup a mysql database that I can then
stick into my crontab to run regularily
the command I want to execute is along the lines of this one:
mysqldump -h myhost -u root -pmypass dbname > dbname_backup
the trick is - I want multiple bacups and therefore a different filename
each time, preferably related to the date. so rather than dbname_backup it
would be something like 20010720 and tomorrow it would be 20010721 and so
on. Is there a way to do this in a bash script? (or any way at all for that
matter)
I have little to no experience with shell scripts so no doubt there is a
profoundly easy way to do this.
thanks guys
bob
More information about the Cork
mailing list