Skip to content

Instantly share code, notes, and snippets.

@liejuntao001
liejuntao001 / rsync.sh
Last active June 9, 2023 06:25
my rsync cheetsheet
# simple copy
rsync -axHAWXS /data/a/ /data/b/
# simple copy showing progress in terminal
rsync -axHAWXS --numeric-ids --info=progress2 /data/a/ /data/b/
# show copy stats at the end
rsync -axHAWXS --stats /data/a/ /data/b/
# copy folder excluding the "lost+found" directory
#Traefik Global Configuration
debug = false
checkNewVersion = false
logLevel = "INFO"
#Define the EntryPoint for HTTP and HTTPS
defaultEntryPoints = ["https", "http"]
#Define the HTTP port 80 and
kind: Service
apiVersion: v1
metadata:
name: testsvc
spec:
selector:
app: test
ports:
- protocol: TCP
port: 8001
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
kubernetes.io/ingress.class: "traefik"
traefik.ingress.kubernetes.io/rule-type: PathPrefixStrip
spec:
rules:
- host: example.com
#!/bin/bash
cmd=$@
command="echo $cmd | sudo socat stdio /run/haproxy/admin.sock"
ssh -o StrictHostKeyChecking=no haproxy $command
single-master masters x 1 workers x 3 haproxy x 0
cpu 2 2 1
memory 4G 4G 2G
storage 80G 80G 50G
highly available masters x 3 workers x 3 haproxy x 2
cpu 2 2 1
memory 4G 4G 2G
storage 80G 80G 50G
kind: Service
apiVersion: v1
metadata:
name: testsvc
spec:
selector:
app: test
ports:
- protocol: TCP
port: 8001
# copy secret
kubectl get secret gitlab-registry --namespace=revsys-com --export -o yaml |\
kubectl apply --namespace=devspectrum-dev -f -
# modify configmap
kubectl create configmap foo --from-file foo.properties -o yaml --dry-run | kubectl replace -f -
kind: Service
apiVersion: v1
metadata:
name: testsvc
spec:
selector:
app: test
ports:
- protocol: TCP
port: 8001