You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
412 B
17 lines
412 B
#!/bin/bash
|
|
|
|
# Flags to exit script when either a command fails or if there's an unset variable.
|
|
set -e
|
|
set -u
|
|
|
|
bucket=$1
|
|
bucket_name=$(basename "$bucket")
|
|
bucket_parent=$(dirname "$bucket")
|
|
|
|
# prefix used to recognize buckets that should be archived.
|
|
# The Java code uses the same prefix. See com.splunk.roll.BucketLister
|
|
archive_prefix="freeze.me."
|
|
|
|
mv "$bucket" "$bucket_parent/$archive_prefix$bucket_name"
|
|
|