Comment

Comment by 65

If you're using S3 to back up your files, it's easier to write a shell script with the AWS CLI. For example here's a script I wrote that I run automatically to back up my computer to S3. I have an exclude array to exclude certain folders. It's simpler than downloading software and more customizable.

# $1 # local folder

# $2 # bucket

declare -a exclude=(

  "node_modules" 

  "Applications"

  "Public"
)

args=""

for item in "${exclude[@]}";

do

  args+=" --exclude '*/$item/*' --exclude '$item/*'"; 
done

cmd="aws s3 sync '$1' 's3://$2$1' --include '*' $args"

eval "$cmd"

parent 65 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton