If you read the previous two recipes, then you'll know how to backup your MySQL database as well as your WordPress files. Let's go a step further with the backups. In this recipe, I'm going to show you how to use a shell script to create automatic backups of both your database and WordPress files.
To use the following shell script, you must have physical or SSH (Secure Shell) access to your server. Confirm with your web host if you are not sure whether you have an SSH access.
Connect to your server using SSH.
Get the script with the help of the following command:
wget http://www.tomsquest.com/blog/wp-content/uploads/2008/09/wpbackupsh.zip
Unzip the script files:
unzip wpbackupsh.zip
Make the script executable:
chmod 700 wpbackup.sh
Edit the script and modify the following lines:
[email protected]
: Your email address (The script sends an email when the backup is finished)WORDPRESS_PATH="...