Simple BASH script to automate full site backups, keeping your files and database safe, also storing current information about PHP environment
./drupal8_backup.sh
- Ubuntu, Debian, CentOS, Unix - like OS
- zip
Uncomment those lines to add additional features to the backup script
find $ARCHIVE_DIR -type f -name "$PROJECT_NAME-*" -mtime +15 -delete
aws s3 cp $FILE_NAME s3:https://your_backet/drupal/backup/
$DRUPAL_DIR"vendor/bin/drush" vset --always-set maintenance_mode 1
$DRUPAL_DIR"vendor/bin/drush" cr
- Unzip
- Uplaod/replace mysql database
- Adjust settings if changed