Simple database backup shellscript

I made a simple shellscript it will:

  • dump a few databases
  • create a tar.gz from them
  • scp a copy of the tar.gz to my backups folder on a┬áremote server, this way I will always have a backup of my most important databases on a remote location.

Just save it in a file, and add it to your cronjob (crontab -l) I run it every 4 hours, by adding this to my crontab: