From 38cd3c8d062fbefc5d4df3915df94e28f20d0f19 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Tue, 28 Feb 2023 16:09:48 +0000 Subject: [PATCH] gets archives stored on a variety of work hosts to get them down to current host. does not attempt to clean them off remote hosts. --- .../fred/scripts/jobby/archie_grabber.sh | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 scripts/customize/fred/scripts/jobby/archie_grabber.sh diff --git a/scripts/customize/fred/scripts/jobby/archie_grabber.sh b/scripts/customize/fred/scripts/jobby/archie_grabber.sh new file mode 100644 index 00000000..7c0d1109 --- /dev/null +++ b/scripts/customize/fred/scripts/jobby/archie_grabber.sh @@ -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 + + -- 2.34.1