#! /bin/bash # Database Backup mysqldump --opt -Q -u dbusername -pPassword dbname > /path/to/backups/`date --iso-8601`.sql sleep 5 # Filesystem Backup tar -czvf /your/backup/folder/sitedata-`date --iso-8601`.tar.gz /path/to/your/siteroot/httpdocs/