Created
May 12, 2020 09:45
-
-
Save arvindkumarbadwal/29dd47d85f918a89a97ba7273884ec3a to your computer and use it in GitHub Desktop.
Syncing files from EC2 instance to S3 bucket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#source directory path | |
backup_path=/var/www/application/uploads | |
#destination s3 bucketname | |
bucket_name=uploads | |
echo "Sync Process Start ::" $(date) | |
# s3 sync command | |
aws s3 sync $backup_path s3://$bucket_name | |
echo "Sync Process End ::" $(date) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment