Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
woo hoo!!

Geoffrey Anderson geoffreyanderson

😀
woo hoo!!
View GitHub Profile
@geoffreyanderson
geoffreyanderson / syncFilesystemToImage.sh
Created Jun 2, 2011 — 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).
View syncFilesystemToImage.sh
#!/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'}