Intro
- There’s a nice tool for doing fast and easy backup to AWS S3: backup gem
- There should be done a lot of steps for setup a backup though.
- So it could be automated with chef.
- In this article I’ll write log of creation backup gem’s cookbook.
- Essentially this cookbook will install backup gem, that will backup /var/www folder to AWS S3 every day in 01:00. It will store last 14 backups.
Sometimes you need to rewrite your email in your commits in some git repository. Do it with command:
git filter-branch --env-filter 'if [ $GIT_AUTHOR_EMAIL = bad@email ]; then GIT_AUTHOR_EMAIL=correct@email; fi; export GIT_AUTHOR_EMAIL' For your collaborators this operatioin might be dangerous. According to Jakub Narębski collaborators will need to:
if they didn’t base their work on history pre-rewrite, just git reset --hard origin/master or just git pull origin (which should fast-forward).
Just a quick note:
Good article about Resolving “nf_conntrack: table full, dropping packet.” flood message in dmesg Linux kernel log
I tried three ruby libs for managing Elastic IPs for AWS EC2.
- fog
- right_aws
- Official Ruby AWS SDK.
I wholeheartedly recommend Official AWS Ruby SDK, as most simple and easy to use.
I also insert several examples of assigning Elastic IPs with AWS Ruby SDK:
Connect to AWS API with fog.
require 'fog'
c = Fog::Compute.new(
:provider => 'AWS',
:aws_access_key_id => 'Your AWS access key',
:aws_secret_access_key => 'Your AWS secret key',
:region => 'us-east-1' )