简体   繁体   中英

Stoping an EC2 instance without losing the data on a mounted ephemeral drive?

I'm using an EC2 instance on amazon and have mounted a 1TB ephemeral to the instance. The instance is an on-demand instance that costs $5 an hour. I was wondering whether there is anyway that I could stop (not terminate) the instance and still keep my data on the mounted ephemeral drive?

The Amazon EC2 Instance Store documentation says that if I stop it, I will lose the data. Does anyone have a solution?

Instance Store is disk storage directly-attached to the Amazon EC2 host machine. When an EC2 instance is Stopped , the virtual machine is removed and it loses the CPU, RAM and Instance store so that it can be allocated to another user.

Data saved on Amazon EBS disk volumes are retained because this is network-attached storage that is kept separate from the Host computer.

The only way to "save" your data is to copy it to another location (eg an EBS volume or Amazon S3 bucket) before stopping the instance.

You can use Amazon Elastic Block Store volumes for an ec2 instances. Once you stopped your instance, ebs volumes will retain the data. You can take snapshots on your ebs volume by specific time or incremental snapshot based on your requirement. BTW, You can store the snapshot in AWS S3 bucket for backup purposes. You can copy snapshot to different region via AWS Management Console or AWS API calls.

If you choose instance store volume type, you will lose your data. For persistent disk storage you can choose AWS EBS volumes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM