Bash Website Backup Script
We wrote tutorial how to crate cron jobs in CPanel and now we're continuing with instructions for creating a simple bash website backup script that works on Linux hosting environment.
{mobile_block=responsive_ad_728_90}
What does the script do
- Check if backup folder already exists
- Create if the backup folder exist
- Backup website files
- Backup website database
- Output errors to the error.log file
Create a file, copy/paste the following bash code and change variables to suit your environment: