aboutsummaryrefslogtreecommitdiffstats
path: root/script/archiver/oeuf-archiver.sh
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-05-02 20:27:40 +0200
committerLibravatar Rutger Broekhoff2024-05-02 20:27:40 +0200
commit17a3ea880402338420699e03bcb24181e4ff3924 (patch)
treeda666ef91e0b60d20aa0b01529644c136fd1f4ab /script/archiver/oeuf-archiver.sh
downloadoeuf-17a3ea880402338420699e03bcb24181e4ff3924.tar.gz
oeuf-17a3ea880402338420699e03bcb24181e4ff3924.zip
Initial commit
Based on dc4ba6a
Diffstat (limited to 'script/archiver/oeuf-archiver.sh')
-rwxr-xr-xscript/archiver/oeuf-archiver.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/script/archiver/oeuf-archiver.sh b/script/archiver/oeuf-archiver.sh
new file mode 100755
index 0000000..478d4d9
--- /dev/null
+++ b/script/archiver/oeuf-archiver.sh
@@ -0,0 +1,31 @@
1#!/usr/bin/env bash
2
3set -eux
4set -o pipefail
5
6# This option prevents the loop from running
7# if it does not match any files
8shopt -s nullglob
9
10oeuf-bundleparquet
11
12export AWS_ACCESS_KEY_ID="$S3_ACCESS_KEY_ID"
13set +x # Don't print the secret access key to the log
14export AWS_SECRET_ACCESS_KEY="$S3_SECRET_ACCESS_KEY"
15set -x
16
17for file in ./merged/oeuf-*.parquet; do
18 rclone move \
19 --s3-provider "$S3_PROVIDER" \
20 --s3-region "$S3_REGION" \
21 --s3-endpoint "$S3_ENDPOINT" \
22 --s3-env-auth \
23 $file.meta.json :s3:$S3_BUCKET \
24 && \
25 rclone move \
26 --s3-provider "$S3_PROVIDER" \
27 --s3-region "$S3_REGION" \
28 --s3-endpoint "$S3_ENDPOINT" \
29 --s3-env-auth \
30 $file :s3:$S3_BUCKET
31done