Skip to content

Instantly share code, notes, and snippets.

@petterik
Created December 4, 2013 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petterik/7793825 to your computer and use it in GitHub Desktop.
Save petterik/7793825 to your computer and use it in GitHub Desktop.
Script to copy buckets using Shuttl and without the move needed in the warmToColdScript.sh
set -e
set -u
cd $SPLUNK_HOME/etc/apps/shuttl/bin
bucket="$1"
source java_executable.env
$JAVA -cp ./*:../lib/* com.splunk.shuttl.archiver.copy.ColdCopyEntryPoint "$bucket" &
# The sleep below is for when testing the script through Java.
# For some reason, the ColdCopyEntryPoint won't have time to start,
# before the script ends. And it seems like all background processes
# are killed/slayed when Java ends it's shell process.
if [ "$#" -gt 2 ]; then
sleep 3 # Java sleep.
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment