4

I need to take the snapshot of all the EC2 instances. I am confused how to take the snapshot of the volume that is mounted as root? Should I shut down the instance before taking the snapshot of root volume?

2 Answers 2

1

Assuming you have and EBS-backed instance, to create a snapshot for an EBS volume that serves as the root device, you should stop the instance before taking the snapshot.

See Creating an Amazon EBS Snapshot

2
  • 2
    And what if stopping is not an option?
    – chrismarx
    Apr 30, 2018 at 19:55
  • I know its been 7 years, but even though its recommended to stop the instance, in my experience the process works just fine with the instance running. Maybe a tad slower.
    – ccov77
    Dec 15, 2022 at 11:52
0

If you shutdown all machines and after take snapshots thats the much better, if not affect your infrastructure.

use the that link for create snapshot http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html you can create a script.like this as you can better..
all_instance_ids=ec2-describe-instances | grep INSTANCE | grep running | sort -k10 | cut -f2 for i in ${all_instance_ids} do ec2-create-snapshot ${i} done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .