views:

35

answers:

1
+1  Q: 

Overwrite a Backup

Hi Friends,

I need to set up a job to create backup everyday. I also need to overwrite an existing backup. Can somebody please help me with it.

Thanks,

+1  A: 

Have a look at mysqldump.

mysqldump db_name tbl_name > backupfile.sql

will dump the a db / table and overwrite backupfile.sql if it exists.

Use rsync or scp to copy it to another host if needed.

aioobe
Thank you but I did not really get it. Can you please let me know how is this mysqldump created.