Commit 127c918a88c3498009e8efa805b0f6bba66bee03

Thomas de Grivel 2024-01-26T13:18:57

backup

diff --git a/bin/backup_git b/bin/backup_git
new file mode 100644
index 0000000..1882153
--- /dev/null
+++ b/bin/backup_git
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [[ $(whoami) = git ]]; then
+    exec nice rsync -aHP 'git-backup@vu.kmx.io:/home/git/*' /home/git/
+else
+    exec su -s /bin/ksh - git -c "$0"
+fi
diff --git a/bin/backup_home b/bin/backup_home
index 696bb53..9655a05 100755
--- a/bin/backup_home
+++ b/bin/backup_home
@@ -1,11 +1,19 @@
 #!/bin/sh
 
-HOSTS="twice reed bim proton"
-HOSTS="$HOSTS os oaa vuchil vulon vusea vusing"
+HOSTS=
+
+# s.kmx.io
+HOSTS="$HOSTS bim pfem reed twice"
+
+# s.kmx.io sparc64
+#HOSTS="$HOSTS neutron proton"
+
+# kmx.io remote
+HOSTS="$HOSTS oaa os vuchil vulon vusea vusing"
 
 PATHS="$@"
 if [ "x$PATHS" = "x" ]; then
-    PATHS="Documents c/thodg common-lisp/thodg config erlang/thodg kmx.io ports ruby/thodg txt"
+    PATHS="Documents c/thodg common-lisp/thodg config erlang/thodg kmx.io ports ruby/thodg txt/thodg"
 fi
 
 run () {
diff --git a/bin/backup_home_full b/bin/backup_home_full
new file mode 100755
index 0000000..4a6a73b
--- /dev/null
+++ b/bin/backup_home_full
@@ -0,0 +1,4 @@
+#!/bin/sh
+for HOST; do
+    rsync -aP Documents Pictures c common-lisp cxx demos erlang fonts img js kmx.io ktas mathematics perl ports python ruby tcl txt music son video wifi win64 "$HOST":
+done