Something like:
for db in $(mysql -e "show databases" -B --skip-column-names); do
mysqldump --opt --databases "$db" \
| gzip -3 --rsyncable > "/var/backup/$db-$(date +%Y-%m-%d).sql.gz"
done
You can then use that in a cron job to do your backups every day.
You can make mysqldump dump all databases into one file, but that makes it very hard to restore just a single database if something goes wrong. If you're copying the file off to another server via rsync, you really want the --rsyncable option. It wastes some diskspace in return for better performance over rsync. It's mostly to do with the way rsync calculates blocks of data to transfer.
We use something very similar to the above script, except we don't use a date in the filename, as this causes you to have to deal with cleaning up old backups. We use backuppc to deal with keeping old copies around. Unless you already have a remote backup solution, I highly recommend looking at backuppc.