Greetings all,

Not sure if this is the right place to ask this,...I use the following script on an OS X server to backup my mysql databases:

#!/bin/sh
DATE=`/bin/date +%Y%m%d"_"%H%M%S`;
cd /Users/usernmae/Documents;
/usr/bin/mysqldump -hhost -uusername -ppassword --all-databases > full_dump_$DATE.sql;
exit

The script runs on from the crontab each morning at 3:30 am. Simple question, I got the script from someone else, so I'm not too savvy with scripting. What can I add to the script so that it automatically erases backups that are x weeks or days old? If I forget about it, the backup folder soon blossoms as it collects a new backup each day, and I'd like to automate the process more so I'm not holding on to tons of old backups.

Thanks
Jeff

--
************************
Jeff Mao
[EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to