I hereby claim:
- I am parsaeian on github.
- I am parsaeian (https://keybase.io/parsaeian) on keybase.
- I have a public key whose fingerprint is 0825 62CF 99BA 3DB9 9526 EE3C 3393 304A F538 04F4
To claim this, I am signing this object:
| #!/bin/bash | |
| # This is my production backup script. | |
| # https://sqlgossip.com | |
| set -e | |
| set -u | |
| usage() { | |
| echo "usage: $(basename $0) [option]" | |
| echo "option=full: Perform Full Backup" |
| #!/usr/bin/env bash | |
| ############################################################ | |
| # MIGRATED TO REPOSITORY | |
| # https://github.com/tavinus/cloudsend.sh | |
| # | |
| # This gist will NOT be updated anymore | |
| ############################################################ | |
| ############################################################ |
| #!/bin/sh | |
| TMPFILE="/tmp/xtrabackup-runner.$$.tmp" | |
| USEROPTIONS="--user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST}" | |
| BACKDIR=/srv/mysql-bak | |
| BASEBACKDIR=$BACKDIR/base | |
| INCRBACKDIR=$BACKDIR/incr | |
| FULLBACKUPCYCLE=604800 # Create a new full backup every X seconds | |
| KEEP=1 # Number of additional backups cycles a backup should kept for. | |
| START=`date +%s` |
| while true; do (echo -e 'HTTP/1.1 200 OK\r\n'; echo -e "\t$(date)\n") | nc -lp 8080; done |
| xtrabackup --backup --compress --compress-threads=12 --parallel=12 --user=dbuser --password=dbpassword --stream=xbstream --target-dir=/path/to/mysql-data | ssh $remote_host "xbstream -x -p 12 -C /path/to/backup-dir" |
| for namespace in $(kubectl get -o name namespace) | |
| do | |
| ns=$(basename $namespace) | |
| mkdir -p $ns | |
| pushd $ns | |
| for object_name in $(kubectl get -o=name pvc,configmap,serviceaccount,secret,ingress,service,deployment,statefulset,hpa,job,cronjob -n $ns) | |
| do | |
| mkdir -p $(dirname $object_name) | |
| kubectl get -o=yaml --export $object_name -n $ns > $object_name.yaml | |
| done |
| docker ps -a | awk '{print $NF}' | grep "container-name" | xargs -I'{}' docker exec {} sh -c 'echo "nameserver 8.8.8.8\nnameserver 1.1.1.1" | cat - /etc/resolv.conf | tee /etc/resolv.conf' |
I hereby claim:
To claim this, I am signing this object: