Gzip and S3 Upload
Mar 18, 2025 Gzip Written by Vivek Shukla
#!/bin/bash
cd /path/to/parent/directory/of/project
directory="your_dir"
bucket="your_bucket"
# no change needed from here
suffix=$(date +"%Y%m%d%H%M%S")
filename=$directory"_"$suffix".tar.gz"
tar -czf $filename $directory
aws s3 cp $filename s3://$bucket
rm $filename
# extracting
# tar -xzf filename.tar.gz -C dir