David Kerr
2012-12-31 19:05:30 UTC
Howdy!
I'm hoping someone can give me an example of how to create an AWS instance
from a snapshot. (basically, I want to clone a server)
I'm able to get the volumes snapshotted ok
box = $ec2.servers.get(x.resource_id)
box.volumes.all.each { |x|
snapshot = x.snapshot
// do stuff
}
so now that i've got these snapshots, I'm not entirely sure how to create
the new instance with them, i could create the instance
and add the volumes after the fact, but I'm looking to replace the root
partition, so it seems like i'd want to replace them on creation.
For a while i thought block_device_mapping was what I wanted, but there
doesn't seem to be a snapshot-id for that.
Any help would be awesome,
Thanks
I'm hoping someone can give me an example of how to create an AWS instance
from a snapshot. (basically, I want to clone a server)
I'm able to get the volumes snapshotted ok
box = $ec2.servers.get(x.resource_id)
box.volumes.all.each { |x|
snapshot = x.snapshot
// do stuff
}
so now that i've got these snapshots, I'm not entirely sure how to create
the new instance with them, i could create the instance
and add the volumes after the fact, but I'm looking to replace the root
partition, so it seems like i'd want to replace them on creation.
For a while i thought block_device_mapping was what I wanted, but there
doesn't seem to be a snapshot-id for that.
Any help would be awesome,
Thanks