A script to backup MySQL databases and website data. Backs up all databases to individual gzipped files and each directory in WWW_DATA_DIR
to individual gzipped tar archives.
backup_env.sh
is used to set the neccessary config. This must exist next to the backup script.- Use the example here as a starting point.
backup.sh
is the script itself. Download an execute using./backup.sh
.- You're probably using this on a production server. MAKE SURE YOU KNOW WHAT IT WILL EXECUTE!
- Set
DRY_RUN
to anything other than 'false' to check what commands will execute.