Hello,
I have the following command that I run via SSH and I want to run instead as a cron job:
This command backs up my MySQL database file. My question is, how can I make this a cron that runs without removing the contents of file.sql? If I run this once a week will it just overwrite the file.sql file or not execute because the file already exists, unless I delete it?Code:mysqldump --opt --single-transaction -uusername -ppassword database > /home/username/backups/file.sql
Ideally I would like to have it save the file in such a way that there are multiple dump files present until I delete them, either like file1.sql, file2.sql or file_todaysdate.sql. Is there any way to set up this cron job like this?
Thanks.![]()



LinkBack URL
About LinkBacks
Reply With Quote





