Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
MySQL Dump script help - Date HASH...
I have a dump sql script that I am running on my database machine right now but the problem is I have to manually run it everyday because I have to edit the file to change the dump file name to reflect the current date. I want to know if there is a way to hash the name to grab the system date and use that in the name so that I can run the script via cron... Any help will be appreciated...
This is the outfile part of the script:
INTO OUTFILE "/data/export/06-18-2007_all_user_dump.txt"
You're probably best writing a bash script that cron fires off. With this, in the bash script would be something like:
#!/bin/bash DATE=`date +%d-%m-%Y` SELECT * INTO OUTFILE /data/export/$DATE_all_user_dump.txt"I am not an alcoholic, alcoholics go to meetings"
Registered Linux user = #372327