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
#You can pull this off using mysqldump. Here the catch: You cannot ship the data because there may be a cost associated with shipping the data. | |
#For this example, let's says you want to rename mydb to ourdb | |
#STEP 01 : Create the new database | |
mysql> CREATE DATABASE ourdb; | |
#STEP 02 : Get schema without the triggers | |
mysqldump -hrdshost -uuser -ppassword -d -t -R --skip-triggers mydb > /tmp/schema.sql | |
#STEP 03 : Get the triggers |
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
#!/usr/bin/env bash | |
PROD_ENV="ent-tx3iahfl3v2uk-production-vohbr3y@ssh.us-3.magento.cloud" | |
STAGE_ENV="ent-tx3iahfl3v2uk-staging-5em2ouy@ssh.us-3.magento.cloud" | |
INT_ENV="tx3iahfl3v2uk-integration-5ojmyuq--mymagento@ssh.us-3.magento.cloud" | |
TIMEFORMAT=%R | |
db_data_reg="cat app/etc/env.php | grep -A 10 \"'db'\"" | |
try() { | |
"$@" || { echo "command failed, with exit code $?"; exit 1; } |
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 | |
## Configuration | |
SRC_CODE="/var/jenkins_home" | |
BACKUP_DIR="/home/ec2-user/" | |
PROJECT_NAME="jenkins-vfqa" | |
DST_HOST="user@host" | |
REMOTE_DST_DIR="/root/backup" | |
EXCLUDES="-x '*/workspace/*' '*/jobs/*/builds/*' '*/jobs/*/lastStable/*' '*/jobs/*/lastSuccessful/*'" | |
BACKUP_DAILY=true # if set to false backup will not work |
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
#!/usr/bin/env bash | |
AWS_ACCESS_KEY_ID="ARICICnfC3274R522L6F" \ | |
AWS_SECRET_ACCESS_KEY="qLwaE0s7m/LrfP+" \ | |
certbot --agree-tos -a certbot-s3front:auth \ | |
--certbot-s3front:auth-s3-bucket sdfnowier \ | |
--certbot-s3front:auth-s3-region us-east-2 \ | |
-i certbot-s3front:installer \ | |
--certbot-s3front:installer-cf-distribution-id EFGQREDSAF \ | |
-d site.com -d www.site.com |
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
awk -vDate=`date -d'now-2 hours' +[%Y-%m-%dT%H:%M:%S` '$4 > Date {print $1}' access.log | sort | uniq -c | sort -n | tail |
OlderNewer