Automatic Backup & Restore

Hey guys!
We want to automate the database backup process in background, perhaps with crontab

What would you recommend to automate this task correctly? Any useful example?

Cheers