A simple Docker image to periodically backup directories on my server.
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.
 
 

14 lines
332 B

#!/bin/bash
set -e
filename="backup.tar.gz"
cd /backup
echo "Creating archive..."
echo $BACKUP_DIRS | tr " " "\n" > files.txt
rm $filename 2>&1 || true
tar --warning=no-file-changed -czf $filename -T files.txt 2>&1 || true
echo "Uploading to Backblaze..."
aws s3 cp $filename "s3://$BUCKET/$filename" --endpoint-url "$ENDPOINT"