Skip to content

Instantly share code, notes, and snippets.

@jazzychad
jazzychad / gist:3861848
Created October 9, 2012 22:28
git post-receive hook to tar the repo and send to s3 for backup
#!/bin/bash
# a post-receive hook for git servers to tar the current repo and send to s3 for backup
# save as 'post-receive' and put it in .git/hooks of desired repo(s), chmod +x
# assumes you have the s3cmd program installed and configured (sudo apt-get install s3cmd)
echo "thanks for the push. have a nice day."
# configure your S3BUCKET name, the rest should be automatic