Commit 12b3f938 authored by Kai's avatar Kai

uploaded all user archive & small update for single archive

parent 2dad3ce9
WEBIS CHEATSHEET
================
archiveuser Archive a useraccount on a standard webis machine
archiveuser Archive one or all useraccount(s) on a standard webis machine
all Utility Tool to archive all user accounts on a standard webis machine
singleuser Utility Tool to archive a single user account on a standard webis machine
betamng Low level scripts for managing Betaweb.
activate_vnc_all Activate vnc on all nodes of the hostlist
bios_cpu_test_all Starts bios cpu test on all nodes of the hostlist
change_lcd_msg_all Change lcd message of every node of betaweb to betaweb???
check_dimms Check for warnings concerning RAM modules in idrac for all betaweb machines
do_all Run a command sequential on all betamng nodes
enable_pxe_bios_boot_all Enable pxe bios boot on all hosts: experimental! hope and prey
get_bios_boot_settings_all Get boot settings from all nodes
pssh Run a command parallel on all betamng nodes
read_all_macs Printout system dump of all hosts for extracting mac addresses
set_critical_temp_shutdown Set settings for shutdown on critical temperature
ssh Open ssh session to one of the betamng nodes (racadm can be used)
start_all Start every node of betamng (parallel)
status_all Get power status of every node of betamng
stop_all Shutdown every node of betamng
virtualscreen Open java vnc session to one of the betamng nodes, via idrac
vnc Open vnc session to one of the betamng nodes
betaweb High level scripts for betaweb, e.g. hadoop management.
check_ram
restart_hadoop_ressourcemanager Restart hadoop ressource manager on betaweb020 and restarts nodemanager
rolling_restart Restart betaweb nodes one after another
rolling_state Apply Salt state on nodes one after another
status Get status of betaweb via salt
core Core functions of the Webis command.
checker Check codestyle of project
install Install webis to PATH
remove Remove webis from PATH
update Update the webis command from Git
update-cheatsheet Update local copy of code-webis-cmd/cheatsheet.txt
version Get webis version
cvs Helper scripts for working with the Webis CVS server
status Checks what changed in this CVS directory without doing anything
......@@ -34,15 +59,21 @@ git Helper scripts for working with the Webis Git server and Gi
web-admin Display a web-admin view for Gitlab (need to have a token with admin access)
k8s Kubernetes tools
connect-test-cluster Connect kubectl to the testing cluster
login Set up OpenID authentication for kubernetes access
pki Webis TLS PKI Tools
cert
util General helper tools and utilities
backup-btrfs-vol Take a snapshot of a btrfs subvolume and back up its contents to another location
list-buw-dns List all assigned Webis host names / IP addresses at BUW
login Get user name for a university login
patch-jar Add files from one jar to another
read-from-clipboard Print the clipboard to standard output
sshproxy Set up an SSH proxy tunnel for accessing digital library content or university-restricted URLs
tasks Execute lists of tasks in parallel
webis-web-permissions Find files with missing group write permission on gonzo
write-to-clipboard Fill the clipboard from standard input
webis20 Storage Management Scripts, need direct access to RAID Controller and MegaCLI installed
......
......@@ -16,7 +16,7 @@
"webis20": "Storage Management Scripts, need direct access to RAID Controller and MegaCLI installed",
"pki": "Webis TLS PKI Tools",
"k8s": "Kubernetes tools",
"archiveuser": "Archive a useraccount on a standard webis machine"
"archiveuser": "Archive one or all useraccount(s) on a standard webis machine"
},
"commands_aliases": {
......
#!/usr/bin/env bash
# Utility Tool to archive all user accounts on a standard webis machine
# based on https://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/
# Author: Kai Lorenz
# Last update 07.03.2019
sudo mkdir /move
cd /home/ || exit
for f in */; do
# do some stuff here with "$f"
# remember to quote it or spaces may misbehave
varTargerUser="$f"
if [[ $varTargerUser != *"webis"* ]];then
varArchiveName=$({ date +%Y; echo -; hostname; echo -; echo $varTargerUser; } | sed ':a;N;s/\n/ /;ba' | tr -d '[:space:]')
sudo apt-get autoremove -y
echo "creating tar from home"
sudo tar --exclude='/home/$varTargerUser/.local/share/Trash/' --exclude='/home/$varTargerUser/.cache/mozilla' --exclude='/home/$varTargerUser/.wine' --exclude='/home/$varTargerUser/.cache/google-chrome' --exclude='/home/$varTargerUser/.cache/pip' --exclude='/home/$varTargerUser/.cache/thumbnails' -zcvpf /move/$varArchiveName.tar.gz /home/$varTargerUser
sudo mv -uv /move/* /mnt/nfs/webis20/code-in-archive/account-graveyard
fi
done
#!/usr/bin/env bash
# Utility Tool to archive a user account on a standard webis machine
# Utility Tool to archive a single user account on a standard webis machine
# based on https://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/
# Author: Kai Lorenz
# Last update 24.02.2019
ls /home/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment