I tried many scripts for database backup but I couldn\'t make it. I want to backup my database every hour.
I added files to \"/etc/cron.hourly/\" folder, changed its chm
Create a script similar to this:
#!/bin/sh -e
location=~/`date +%Y%m%d_%H%M%S`.db
mysqldump -u root --password= database_name > $location
gzip $location
Then you can edit the crontab of the user that the script is going to run as:
$> crontab -e
And append the entry
01 * * * * ~/script_path.sh
This will make it run on the first minute of every hour every day.
Then you just have to add in your rolls and other functionality and you are good to go.