#sysadm
Explore tagged Tumblr posts
Text
{¤} [#] {@} 《|》 (♡)
A one for them all...
Their biting innovation...
Their kindness to the end...
Their wrath at it all...
And their love in spite of it...
O King of the ruin world, you are alone, save for these ghosts.
.
.
.
Hello there. I am the Admin, your humble writer for this blog. Ooc communication will be in dms or tagged with #SYSADM
4 notes
·
View notes
Note
Just Observe, as is our nature. You are quite paranoid Strawberry.
{¤}
- @that-which-sees-you
What do you want from me?
14 notes
·
View notes
Note
I am still watching you <3. I brought you a gift it’s a tub of mayonnaise
- @farmer-juice (happy April fools. The mayo is duck mayo)
!!!
A birthday present! Thank you :D
#ask blog#{¤}#SYSADM: Appologies#SYSAMD: for the lateness- that is#SYSADM: and in general- or the reply side.
2 notes
·
View notes
Text
pg upgrade
Provision after upgrade.
pg-upgrade.sh:
#!/usr/bin/env bash set -eu p_host=$1 p_db=$2 . ./pg-lib.sh eval set -- "$( getopt -o h --long no-backup,help \ -n "$(basename -- "$0")" -- "$@" )" p_no_backup= while true; do case "$1" in --no-backup) p_no_backup=1 shift ;; -h|--help) cat <<USAGE $0 OPTIONS... HOST DB --no-backup USAGE exit ;; --) shift break ;; esac done hr 'copy scripts' scp pg*.sh "$p_host": hr status time ssh "$p_host" -t " ./pg-status.sh $(qs "$p_db"); apt list --installed postgresql*; " if ! [ "$p_no_backup" ]; then hr pg_dump time ssh "$p_host" " su - postgres -c $(qs 'pg_dump '"$(qs "$p_db")") " > "$p_host-$(date +%Y%m%d-%H%M%S).sql" hr 'stop pg' time ssh "$p_host" " systemctl stop postgresql; while pgrep -x postgres > /dev/null; do printf .; sleep 1; done; printf $(qs '\n'); " hr tar time ssh "$p_host" " su - postgres -c $(qs 'tar czf '"$(qs "$p_db")"'-datadir-$(date +%Y%m%d-%H%M%S).tar.gz 9.3'); " hr fname fname=$(ssh "$p_host" " su - postgres -c $(qs 'ls *.tar.gz') " | tail -n 1) hr copy time scp "$p_host:/var/lib/postgresql/$fname" . hr rm ssh "$p_host" " su - postgres -c $(qs 'rm *.tar.gz') " hr 'apt update' time ssh "$p_host" " apt update " fi main_pid=$(ssh root@"$p_host" ps --ppid 1 -o pid= -o comm= | awk '$2 == "postgres" || $2 == "postmaster" {print $1}') from=$(ssh root@"$p_host" /proc/$(printf "%q" "$main_pid")/exe --version | awk '{print $NF}') if (( "${from%%.*}" < 10 )); then from=$(echo "$from" | sed -E 's/([0-9]+\.[0-9]+).*/\1/') else from=$(echo "$from" | sed -E 's/([0-9]+).*/\1/') fi from=9.3 versions=(9.2 9.3 9.4 9.5 9.6 10) while [ "$from" != "${versions[0]}" ]; do versions=("${versions[@]:1}") done from=${versions[0]} tos=("${versions[@]:1}") for to in ${tos[@]+"${tos[@]}"}; do hr "$(printf '%s -> %s' "$from" "$to")" time ssh "$p_host" " ./pg-upgrade-1.sh --from $(qs "$from") --to $(qs "$to") " hr status time ssh "$p_host" -t " ./pg-status.sh $(qs "$p_db"); apt list --installed postgresql*; " from=$to done
pg-upgrade-1.sh:
#!/usr/bin/env bash set -eu . ./pg-lib.sh eval set -- "$( getopt -o f:,t:,d:,h --long first,last,from:,to:,database:,help \ -n "$(basename -- "$0")" -- "$@" )" p_first= p_last= p_from= p_to= p_database= while true; do case "$1" in --first) p_first=1 shift ;; --last) p_last=1 shift ;; -f|--from) p_from=$2 shift 2 ;; -t|--to) p_to=$2 shift 2 ;; -d|--database) p_database=$2 shift 2 ;; -h|--help) cat <<USAGE $0 OPTIONS... --first --last -f, --from VERSION -t, --to VERSION -d, --database NAME USAGE exit ;; --) shift break ;; esac done pg_home=/var/lib/postgresql pg_lib=/usr/lib/postgresql pg_upgrade=$pg_lib/$p_to/bin/pg_upgrade pg_bin_from=$pg_lib/$p_from/bin pg_bin_to=$pg_lib/$p_to/bin pg_data_from=$pg_home/$p_from/main pg_data_to=$pg_home/$p_to/main pg_config_from=/etc/postgresql/$p_from/main/postgresql.conf pg_config_to=/etc/postgresql/$p_to/main/postgresql.conf pg_stop() { local n=$1 printf '%s %s' -- "$n" systemctl stop postgresql while pgrep -x postgres > /dev/null; do printf .; sleep 1; done printf '\n' } if [ "$p_first" ]; then printf '%s back up database\n' -- as postgres pg_dump "$p_database" > ~/"$p_database-$(date +%Y%m%d-%H%M%S)".sql pg_stop 'stop old postgresql' printf '%s back up old datadir\n' -- as postgres cp -r "$pg_home/$p_from" "$pg_home/$p_from-$(date +%Y%m%d-%H%M%S)" printf '%s apt update\n' -- apt update fi printf '%s install new postgresql\n' -- apt -y install "postgresql-$p_to" pg_stop 'stop postgresql' printf '%s back up new datadir\n' -- as postgres cp -r "$pg_home/$p_to" "$pg_home/$p_to-$(date +%Y%m%d-%H%M%S)" printf '%s migrate data\n' -- as postgres "$pg_upgrade" -b "$pg_bin_from" -B "$pg_bin_to" \ -d "$pg_data_from" -D "$pg_data_to" \ -o " -c config_file=${pg_config_from@Q}" -O " -c config_file=${pg_config_to@Q}" printf '%s back up new postgresql config\n' -- cp "$pg_config_to" "$pg_config_to-$(date +%Y%m%d-%H%M%S)" printf '%s fix port in new postgresql config\n' -- sed -Ei 's/^(\s*port\s*=\s*)[0-9]+(.*)/\15432\2/' "$pg_config_to" printf '%s remove old postgresql\n' -- # apt -y remove "postgresql.*$p_from" apt -y purge "postgresql.*$p_from" printf '%s start postgresql\n' -- systemctl start postgresql printf '%s analyze\n' -- as postgres vacuumdb --all --analyze-only
pg-status.sh:
#!/usr/bin/env bash set -eu . ./pg-lib.sh p_db=$1 for s in $(get_service_prop postgresql* Id); do active_state=$(get_service_prop "$s" ActiveState) substate=$(get_service_prop "$s" SubState) printf '%s: %s (%s)\n' "$s" "$active_state" "$substate" if [ "$substate" = running ]; then # determine list of tables q_db=$(printf "%q" "$p_db") tables_str=$(su - postgres -c "psql -AtF ' ' -c '\\dt' $q_db | awk '{print \$2}'") _IFS=$IFS IFS=$'\n' tables=($tables_str) IFS=$_IFS # compile table string tables_str= for t in ${tables[@]+"${tables[@]}"}; do q_t=$(qi "$t") count=$(su - postgres -c "psql -Atc 'select count(*) from \"$t\"' $q_db") tables_str=$tables_str${tables_str:+, }"$t: $count" done # print table string while [ "$tables_str" ]; do pre=$(printf " %.0s" {1..4}) printf "%s%.*s\n" "$pre" $(( $(tput cols) - ${#pre} )) "$tables_str" tables_str=${tables_str:$(( $(tput cols) - ${#pre} ))} done fi done
pg-lib.sh:
as() { local user=$1 shift local cmd=() for a; do cmd+=("$(printf "%q" "$a")") done cmd=${cmd[@]+"${cmd[@]}"} su - "$user" -c "$cmd" } qs() { printf '%q' "$1" } qe() { local s=$1 delimiter=${2:-} local re='\.|\*|\[|\^|\$|\\|\+|\?|\{|\||\(' # .*[^$\+?{|( if [ "$delimiter" ]; then re=$re'|\'$delimiter fi printf "%s\n" "$s" | sed -E 's/('"$re"')/\\\1/g' } qi() { local s=$1 printf '%s\n' "$s" | sed -E 's/"/""/g' } get_service_prop() { local service=$1 prop=$2 local q_prop=$(qe "$prop" /) systemctl show "$service" -p "$prop" | sed -E 's/^'"$q_prop"'=//' } get_service_env_var() { local service=$1 n=$2 local env=$(get_service_prop "$service" Environment) for p in $env; do if printf '%s\n' "$p" | egrep ^"$(qe "$n")"= >/dev/null; then printf '%s\n' "$p" | sed -E 's/^'"$(qe "$n")"'=//' return fi done } hr() { local h=$1 local l=${#h} local w=$(tput cols) printf "=%.0s" $(seq 1 "$(( w - l - 1))") printf " %s\n" "$h" }
#en#tech#dev#pg#upgrade#upgrade pg#postgresql#upgrade postgresql#pg upgrade#postgresql upgrade#devops#sysadm#linux#debian#ubuntu#bash#pg notes#notes#postgresql notes
1 note
·
View note
Photo

Don’t be down server...
1 note
·
View note
Note
Hello Admin. Quite an interesting realm you have curated.
{¤}
- @that-which-sees-you
Hello?
18 notes
·
View notes
Note
SYSADM: Transmasc grian my beloved <3
- @that-which-sees-you mod
ooc; love love love LOOOVEEE transmasc Grian 🫶🫶🫶
4 notes
·
View notes
Photo

https://www.opennet.ru/opennews/art.shtml?num=50950 #oslotos #oslotøs #os_lotos #lotosjust #linux #soft #software #softwaredeveloper #softwareengineer #desktop #laptop #server #servers #ubuntu #canonical #sysadm #sysadmin #sysadmins #sysadminlife #санктпетербург #spb #спб #екатеринбург #екб #челябинск #chelyabinsk #тюмень #томск #омск #казань #оренбург #уфа #краснодар #красноярск #ростов #самара #владимир #владивосток #новосибирск #кемерово #сочи #москва #moscow #moscowcity #россия #russia (at Москва-Сити "Город Столиц") https://www.instagram.com/p/BzGkxN9iLbN/?igshid=wp73anqjzhxk
#oslotos#oslotøs#os_lotos#lotosjust#linux#soft#software#softwaredeveloper#softwareengineer#desktop#laptop#server#servers#ubuntu#canonical#sysadm#sysadmin#sysadmins#sysadminlife#санктпетербург#spb#спб#екатеринбург#екб#челябинск#chelyabinsk#тюмень#томск#омск#казань
0 notes
Video
tumblr
Here we see senior sysadmin or developer helping junior dev/sysadm learning essential skillz. (Via)
49 notes
·
View notes
Text
#SysAdm Menggunakan PuTTYGen untuk Publik dan Privat Key
Menggunakan PuTTYGen untuk Publik dan Privat Key. PuTTYGen digunakan untuk membuat atau menggenerate Public dan Private Key. Public dan private key adalah pasangan yang tidak dapat diganti dengan yang lain apalagi dipisahkan #JombloAkut. PuTTYGen bisa menggenerate banyak ragam public key untuk enkripsi.Termasuk Rivest–Shamir–Adleman (RSA), Digital Signature Algorithm (DSA), Elliptic Curve Digital…
View On WordPress
0 notes
Text
bash: getopt
eval set -- "$( getopt -o a,b:,h --long flag-a,flag-b:,help \ -n "$(basename -- "$0")" -- "$@" )" p_a= p_b= while true; do case "$1" in -a|--flag-a) p_a=1 shift ;; -b|--flag-b) p_b=$2 shift 2 ;; -h|--help) cat <<USAGE $0 OPTIONS... -a, --flag-a -b, --flag-b VALUE USAGE exit ;; --) shift break ;; esac done
1 note
·
View note
Text
SYSADM: Appologies for my lack of replies, executive disfunction is disfunctioning [I believe)
4 notes
·
View notes
Photo

https://www.opennet.ru/opennews/art.shtml?num=50923 #oslotos #oslotøs #lotosjust #os_lotos #linux #linuxserver #ubuntu #ural #fedora #rhel #firefox #kaliningrad #kalilinux #linuxmint #sysadm #sysadmin #sys #санктпетербург #spb #екатеринбург #ekb #мск #moscow #москва #ростов #краснодар #красноярск #тюмень #уфа #новосибирск #владимир #владивосток #владикавказ #сочи #россия (at Москва-Сити "Город Столиц") https://www.instagram.com/p/By-DqFNiFqh/?igshid=1ovkyplormv4o
#oslotos#oslotøs#lotosjust#os_lotos#linux#linuxserver#ubuntu#ural#fedora#rhel#firefox#kaliningrad#kalilinux#linuxmint#sysadm#sysadmin#sys#санктпетербург#spb#екатеринбург#ekb#мск#moscow#москва#ростов#краснодар#красноярск#тюмень#уфа#новосибирск
0 notes
Note
Strawberry, your boyfriend. His name was... Gry-ann? We're quite bad at names, you see.
The compassionate of us are sad at how entertaining what is happening betwixt you and Little Rose. How are you holding up?
- {¤}
- @that-which-sees-you
Oh, I'm doing fine. Perfectly okay, actually. Splendidly wonderful. Um- Who is Little Rose?
8 notes
·
View notes
Text
Como configurar o cliente FreeIPA no Ubuntu 18.04 / CentOS 7 para centralizar a autenticação
Como configurar o cliente FreeIPA no Ubuntu 18.04 / CentOS 7 para centralizar a autenticação
Em nosso artigo anterior, já discutimos sobre o FreeIPA e suas etapas de instalação no servidor do CentOS 7, neste artigo discutiremos como uma máquina Ubuntu 18.04 e CentOS 7 pode ser integrada ao FreeIPA Server para autenticação centralizada.
Estou assumindo que o usuário “ sysadm ” já está criado no FreeIPA Server para sistemas Linux para autenticação centralizada, se não executar os comandos…
View On WordPress
1 note
·
View note
Text
#SysAdm Install Wordpress pada Debian dan Permasalahannya.
#SysAdm Install Wordpress pada Debian dan Permasalahannya. Dalam tutorial kali ini akan admin sharing tahapan-tahapan install wordpress pada debian dan turunannya. Bisa sobat jadikan referensi untuk sekedar belajar di komputer lokal maupun untuk dipublish secara online
Install WordPress pada Debian dan Permasalahannya. Memasang Worpdress pada hosting bisa dibilang sangat mudah kalau menggunakan cPanel karena adanya Softaculous Apps Installer. Yang perlu dipersiapkan hanya domain, username dan password untuk login wordpress lalu tinggal klik install dan selesai. Opsi lain bisa langsung diaktifkan seperti classic editor dan backup. Jika servernya cepet, mungkin…
View On WordPress
0 notes