Add scripts from k3s-main
This commit is contained in:
19
upload_ziptars
Executable file
19
upload_ziptars
Executable file
@@ -0,0 +1,19 @@
|
||||
#! /bin/bash
|
||||
|
||||
s3cmd ls s3://k3s-main-backup/ziptars/ > /root/s3_uploads.txt
|
||||
cd /home/ziptars/
|
||||
for file in *;
|
||||
do
|
||||
if [[ -n $(grep "$file" /root/s3_uploads.txt) ]]; then
|
||||
echo $file uploaded >> /root/uploads_success.txt
|
||||
|
||||
else
|
||||
s3cmd put "$file" "s3://k3s-main-backup/ziptars/$file"
|
||||
echo $file missing uploaded >> /root/uploads_success.txt
|
||||
|
||||
fi
|
||||
|
||||
|
||||
done
|
||||
|
||||
cd
|
||||
Reference in New Issue
Block a user