Last active
June 25, 2020 18:06
-
-
Save ceelsoin/d83550ddf50cf54705225e8feae9e73b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Backup_Directory_Locations | |
BACKUPROOT="/var/www/backups_diarios" | |
TSTAMP=$(date +"%d-%b-%Y-%H:%M") | |
S3BUCKET="approvedemailplatformsso-${domain}" | |
TSTAMP=$(date +"%d-%b-%Y-%H:%M") | |
zip -r /var/www/backups_diarios/$TSTAMP.html.zip /var/www/html/ | |
# Move file from server to your S3 bucket | |
aws s3 mv /var/www/backups_diarios/$TSTAMP.html.zip s3://$S3BUCKET/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Database credentials | |
USER="root" | |
PASSWORD="dhy42imb" | |
HOST="localhost" | |
DB_NAME="mautic" | |
#Backup_Directory_Locations | |
BACKUPROOT="/var/www/backups_diarios" | |
TSTAMP=$(date +"%d-%b-%Y-%H:%M") | |
S3BUCKET="approvedemailplatformsso-${domain}" | |
mysqldump -h$HOST -u$USER $DB_NAME -p$PASSWORD | gzip -9 > $BACKUPROOT/$DB_NAME-$TSTAMP.sql.gz | |
# Move file from server to your S3 bucket | |
aws s3 mv $BACKUPROOT/$DB_NAME-$TSTAMP.sql.gz s3://$S3BUCKET/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment