Hello,
I would like to backup only a database (forum.gz) using a cron job and them send the file by mail to a gmail account.
What should I type in the command line ?? Please help me!
I really appreciate it if someone replied .
Thanks![]()
Hello,
I would like to backup only a database (forum.gz) using a cron job and them send the file by mail to a gmail account.
What should I type in the command line ?? Please help me!
I really appreciate it if someone replied .
Thanks![]()
Last edited by nic_net; 11-29-2006 at 12:26 PM.
This seems like the script what you are looking for: http://members.lycos.co.uk/wipe_out/automysqlbackup/
I do it:
Code:# Nico backup 1.0 # 29-11-06 # Email donde se enviara EMAIL="usermail@domain.com" # Orden de crear el backup mysqldump --opt -u USERNAME -pPASSWORD DBNAME >> /home/backups/file1.sql # Variable fecha DATE=`date +%Y%m%d` # De .sql a .gz gzip file1.sql # Renombro con la fecha el .gz mv file1.sql.gz backup-$DATE.sql.gz # Envio por e-mail echo 'Aqui tienes el backup de hoy.' | mutt -a backup-$DATE.sql.gz $EMAIL -s "MySQL Backup"
Last edited by nic_net; 11-29-2006 at 01:37 PM.