Cron job (Sqldump)

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
Does anyone know how to create a cron job that every day at 12pm it backs up the MYSQL database and gzips it then sends it to my email address?
 

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
Hmmm, that's nice but is it possible to make it an SQL file instead of a text file?
 

kadaver

New Member
Messages
51
Reaction score
0
Points
0
rename the text file extension from .txt to .sql,
but only if the data in the file is in sql format.

I have a program that ouputs the sql as a text file (.txt), and have to do this.

ps: i couldnt get the cron mysqldump thing to work.
 

LHVWB

New Member
Messages
1,308
Reaction score
0
Points
0
I can get the sending system to work. Basically it sends me an email which contains the entire backup as text. Which is a bit of a pain because its huge, but I could't find out how to send it as an attachment or as a .sql file. This is the cron job that I use.

mysqldump -ce --user=user --password=password dbase
 
Last edited:
Top