Skip to content

Instantly share code, notes, and snippets.

@tily
Last active January 29, 2017 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tily/db903af2e7be213ba89ec44b2a045e5c to your computer and use it in GitHub Desktop.
Save tily/db903af2e7be213ba89ec44b2a045e5c to your computer and use it in GitHub Desktop.
restore.sh
[codesuki/ecs-nginx-proxy: Reverse proxy for AWS ECS. Lets you address your docker containers by sub domain.](https://github.com/codesuki/ecs-nginx-proxy)
dirs=$(s3cmd ls s3://tily-heroku-backup | grep DIR | awk '{print $2}')
for dir in $dirs; do
source=$(s3cmd ls $dir | tail -1 | awk '{print $4}')
echo $source
dbname=$(echo $source | awk -F '/' '{print $4}')
mkdir -p $dbname
target=$dbname/`basename $source`
echo $source $target
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment