My client created a ubuntu server 16.04 to deploy a web app. And I have been getting difficulties the get the app deployed properly ...
So is there a way for me to reset the server back to its original state via command line?
My client created a ubuntu server 16.04 to deploy a web app. And I have been getting difficulties the get the app deployed properly ...
So is there a way for me to reset the server back to its original state via command line?
AWS doesn't have a feature like VmWare's restore snapshot
. If you want the machine restore to its original state, you have to launch the machine again. But it will get a different IP. There is no way to reset
your instance to its original state.
Update: Please check this answer as Amazon recently added this feature in 2021. Check this Amazon link
original
instance. You never know if uninstall did a good job. There is no guarantee the dependencies are uninstalled correctly. –
Alcibiades AWS doesn't have a feature like VmWare's restore snapshot
. If you want the machine restore to its original state, you have to launch the machine again. But it will get a different IP. There is no way to reset
your instance to its original state.
Update: Please check this answer as Amazon recently added this feature in 2021. Check this Amazon link
original
instance. You never know if uninstall did a good job. There is no guarantee the dependencies are uninstalled correctly. –
Alcibiades Did you created a snapshot before deploying the app? If not you need to redeploy the AMI in a new EC2 instance.
The feature of replacing Root Volumes was introduced in April 2021 and has been extended to also work for Bare Metal EC2 Mac Instances in Feb 2023 (see this blog post).
To reset an instance to its initial launch state, you can either do it in the EC2 Console ("Actions" -> "Monitor and troubleshoot" -> "Replace root volume" as detailed in another answer) or use this command line:
aws ec2 create-replace-root-volume-task --region <your-instance-region-here> --instance-id <your-instance-id-here> --delete-replaced-root-volume
If you already have a snapshot you want to revert to instead, simply add --snapshot-id <your-snapshot-id-here>
to the command line above.
© 2022 - 2025 — McMap. All rights reserved.