This script allows you to backup your Wordpress and MySQL database to a backup directory of your choosing.
- Edit the script and replace variables prior to running it.
- This script can be placed into a cronjob for automatic backups.
It's easy as extracting your backup files from the tar file and then replace the commands below with your variables in the script.
sudo mysql -u MYSQL_USER -p MYSQL_PASSWORD DATABASE_NAME < DATABASE_NAME.sql
sudo mv WEBSITE_NAME/ WEBSITE_PATH/