gets archives stored on a variety of work hosts
authorChris Koeritz <fred@gruntose.com>
Tue, 28 Feb 2023 16:09:48 +0000 (16:09 +0000)
committerChris Koeritz <fred@gruntose.com>
Tue, 28 Feb 2023 16:09:48 +0000 (16:09 +0000)
to get them down to current host.  does not attempt to clean them off
remote hosts.

scripts/customize/fred/scripts/jobby/archie_grabber.sh [new file with mode: 0644]

diff --git a/scripts/customize/fred/scripts/jobby/archie_grabber.sh b/scripts/customize/fred/scripts/jobby/archie_grabber.sh
new file mode 100644 (file)
index 0000000..7c0d110
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# grabs a set of archives from a set of machines.
+# not tuned for re-use very much yet.
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+function grab_archies()
+{
+  local domain_piece="$1"; shift
+  local host_list="$1"; shift
+  for host in $host_list; do
+    mkdir -p ${host}.${domain_piece}
+    pushd ${host}.${domain_piece}
+    netcp ${host}.${domain_piece}:z_arch* . 
+    retval=$?
+    if [ $retval -ne 0 ]; then
+      echo Error $retval returned from copying z_arch* from ${host}.${domain_piece}
+      exit 1 
+    fi
+    popd 
+  done
+}
+
+mkdir -p $HOME/grabbing_archies
+pushd $HOME/grabbing_archies
+
+domain="its.virginia.edu"
+hostlist="idpprod01 idpprod02 idpprod03 idpprod04"
+grab_archies "$domain" "$hostlist"
+hostlist="idpdev01 idpdev02"
+grab_archies "$domain" "$hostlist"
+hostlist="idptest01 idptest02"
+grab_archies "$domain" "$hostlist"
+hostlist="idpsistest01 idpsistest02"
+grab_archies "$domain" "$hostlist"
+
+domain="storage.virginia.edu"
+hostlist="manage-s admin02 admin-hsz-s"
+grab_archies "$domain" "$hostlist"
+
+popd
+
+