Skip to content

Instantly share code, notes, and snippets.

View geoffreyanderson's full-sized avatar
😀
woo hoo!!

Geoffrey Anderson geoffreyanderson

😀
woo hoo!!
View GitHub Profile
@geoffreyanderson
geoffreyanderson / syncFilesystemToImage.sh
Created June 2, 2011 18:19 — forked from fairchild/bundle-to-ebs.sh
A script to rsync a running Linux OS to an image file (specifically, a 10GB image file for deployment to AWS EC2).
#!/bin/bash
# Run this script on a running Linux OS that you want to be put into an image file.
# Ensure that the system you run this on is less than 10GB in size if you wish to
# deploy the image file to AWS EC2.
# Note: This is based on Michael Fairchild's instance-to-ebs-ami.sh script.
# -https://gist.github.com/249915
imageFile=${1:-"awsImage-$(date +%m%d%y-%H%M).img"}
imageMountPoint=${2:-'/mnt/image'}
extraFilesArchive=${3:-'awsInstanceFiles.tar.gz'}